fix(api): add GET /api/charts/[id] and fix batch prediction
- Add GET handler to /api/charts/[id] route to fetch chart metadata - Fix batch prediction to use regular /predict endpoint with database candles - Remove /predict/batch usage (was designed for file-based predictions) - Make volume field optional in CandleData model (database candles don't have volume) - Convert timestamps to ISO dates for batch requests Known issue: TA-Lib indicators failing with 'input array type is not double' - May need to ensure candle data is float64/double type before processing
This commit is contained in:
parent
6d0d67e39b
commit
f850728d44
4 changed files with 24 additions and 10 deletions
Binary file not shown.
|
|
@ -66,7 +66,7 @@ class CandleData(BaseModel):
|
|||
high: float
|
||||
low: float
|
||||
close: float
|
||||
volume: float
|
||||
volume: Optional[float] = None
|
||||
|
||||
|
||||
class PredictRequest(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue