Skip to navigation

Get candlestick history

Retrieve history candlestick charts from recent years(It is last 3 months supported for 1s candlestick).

Query parameters

instIdstringRequired

Instrument ID, e.g. BTC-USDT

barstringOptional

Bar size, the default is 1m e.g. [1s/1m/3m/5m/15m/30m/1H/2H/4H] UTC+8 opening price k-line: [6H/12H/1D/2D/3D/1W/1M/3M] UTC+0 opening price k-line: [6Hutc/12Hutc/1Dutc/2Dutc/3Dutc/1Wutc/1Mutc/3Mutc]

afterstringOptional

Pagination of data to return records earlier than the requested ts

beforestringOptional

Pagination of data to return records newer than the requested ts. The latest data will be returned when using before individually

limitstringOptional

Number of results per request. The maximum is 300. The default is 100.

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of lists of anyOptional