Skip to content

Get candles data

GetChartData

Description:
Returns historical candle data from the local quote storage for the requested symbol, timeframe, and time range.

If the symbol has an external source, the server resolves it and reads history using that source name.

HTTP route exposed by the same handler:

GET /quotes/candles

Parameters

Name Type Required Description
symbol string Internal symbol name
from int64 Range start as Unix timestamp in seconds
to int64 Range end as Unix timestamp in seconds
frame string Candle timeframe, for example 1M, 5M, 1H, 1D
count int No Optional field accepted by validation, currently not used by the handler

Response

Field Type Description
structure array Candle field order
data array Candle list

Each candle is returned as:

[open, high, low, close, volume, time]

Example Request

{
  "symbol": "EURUSD",
  "from": 1712448000,
  "to": 1712534400,
  "frame": "1H"
}

Example Successful Response

{
  "structure": ["open", "high", "low", "close", "volume", "time"],
  "data": [
    [1.1000, 1.1020, 1.0990, 1.1015, 1200, 1712448000],
    [1.1015, 1.1050, 1.1000, 1.1045, 980, 1712451600]
  ]
}

Errors

Code Description
400 Invalid request payload
401 Symbol not found or symbol resolution failed