Get candle history
GET/v1/market-data/accounts/:account_id/candles
Returns historical candles for the selected instrument and timeframe.
Note: Candle history is available for:
- ask
- bid
- both ask and bid
Rules:
- 'from' is required
- use either:
- from + count
- or from + to
- 'from' must be earlier than
to - 'count' is bidirectional, maximum values are 1000 and -1000
- if 'to' is used, the requested range must not exceed from + 1000 candles count
- returned candles are sorted in ascending time order, from older to newer
Time range semantics:
fromis inclusivetois exclusive- A candle is included if its open time is greater than or equal to
fromand strictly less thanto - Example: for H1 candles,
from=12:00,to=13:00returns the candle with open time12:00, not a separate13:00candle.
Historical data availability depends on timeframe:
- M1, M3 → 1 year
- M5, M10 → 2 years
- M15, M30 → 3 years
- H1+ → full available history
Possible business errors:
- invalid instrument
- invalid timeframe
- invalid time range
- invalid count
- invalid price type
Request
Responses
- 200
- 400
- 401
- 410
- 500
Candle history returned successfully
Bad Request
Possible reasons:
- invalid instrument
- invalid timeframe
- invalid time range
- invalid count
Authorization failed
Invalid account
Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request.