feat: klines-based simulation instead of polling

- Fetch historical klines once from AVE API (10 CU per request)
- Process each candle as a time step
- Limit to 500 candles max per simulation
- No continuous polling - processes all data in seconds
- Frontend now selects kline interval (1m, 5m, 15m, 1h)
- Much more efficient API usage
This commit is contained in:
shokollm
2026-04-12 01:34:20 +00:00
parent d4400f5dcd
commit f425ae08d7
5 changed files with 135 additions and 66 deletions

View File

@@ -100,7 +100,7 @@ class BacktestResponse(BaseModel):
class SimulationCreate(BaseModel):
token: str
chain: str
check_interval: int = 60
kline_interval: str = "1m"
@field_validator("chain")
@classmethod