Initial commit: Gold Trading Simulator with AI-powered analysis
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Literal
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class KlineEvent(BaseModel):
|
||||
symbol: str
|
||||
timeframe: str
|
||||
open_time: datetime
|
||||
close_time: datetime
|
||||
open: float
|
||||
high: float
|
||||
low: float
|
||||
close: float
|
||||
volume: float = 0.0
|
||||
is_closed: bool = Field(default=True, description="True when candle closed")
|
||||
source: Literal["binance", "alpha_vantage", "oanda", "other"] = "other"
|
||||
|
||||
|
||||
class OHLCVRequest(BaseModel):
|
||||
symbol: str
|
||||
timeframe: str
|
||||
start: datetime | None = None
|
||||
end: datetime | None = None
|
||||
Reference in New Issue
Block a user