public/get-candlestick
GETRetrieves candlesticks (k-line data history) over a given period for an instrument (e.g. BTCUSD-PERP)./public/get-candlestick
Request
Query Parameters
instrument_name stringrequired
Instrument symbol, e.g. BTCUSD-PERP
timeframe CandlestickTimeframe
Possible values: [1m, 5m, 15m, 30m, 1h, 2h, 4h, 12h, 1D, 7D, 14D, 1M]
The period value. Default 1m.
count int32
Default value: 25
Number of candles to return. Default 25.
start_ts int64
Start time (Unix timestamp). Default 1 day ago.
end_ts int64
End time (Unix timestamp). Default current time.
Success.
Schema
- Array [
- ]
id int64
Echoed request id
method string
Method invoked
code int32
0 = success; non-zero indicates error (reason code).
result object
Present when code === 0. Candlestick data. data[] has o,h,l,c,v,t (Open,High,Low,Close,Volume,Start time ms).
interval string
The period (e.g. M5).
instrument_name string
e.g. BTCUSD-PERP
data object[]
o decimal
Open
h decimal
High
l decimal
Low
c decimal
Close
v decimal
Volume
t int64
Start time of candlestick (Unix timestamp, ms), e.g. "1771761038000".
message string
Present when code !== 0.
original string
Present when code !== 0.