GET Market Data

abstract

Fetch live OHLCV candle data from MT5 for a given symbol and timeframe — used by the Chart page and LLM analysis pipeline to get current price data.

🔒 Authentication

PropertyValue
MechanismNone
RequiredNo

🛠️ Technical Specification

Request

ParameterLocationTypeRequiredDescription
symbolPathstringYesTrading pair (e.g., EURUSD, XAUUSD)
timeframePathstringYesCandle timeframe: M1, M5, M15, M30, H1, H4, D1
countQueryintegerNoNumber of candles (default: 100)
account_idQueryintegerNoAccount to use for MT5 connection

Logic Flow

📤 Responses

200 OK example:

[
  {
    "time": "2026-05-16T14:00:00Z",
    "open": 1.08520,
    "high": 1.08650,
    "low": 1.08480,
    "close": 1.08610,
    "tick_volume": 1842,
    "spread": 1
  }
]
RolePath
Routerbackend/api/routes/market_data.py
MT5 Bridgebackend/mt5/bridge.py
QuestDBbackend/db/questdb.py
RoleLink
Frontend PagePage - Chart
InfrastructureDevOps - LLMSystemTrading