Skip to main content

Get Kline/Candlestick History

Get Kline/Candlestick History

Description​

You can retrieve historical candlestick data from more than 90 days ago.

Note: If endTime goes past a candle interval boundary (even by 1 ms), the system may round up when calculating the number of candles, and the response may include one additional interval (i.e., the returned data may start one interval earlier).

Notes for Reality stock (rtoken) symbols
  • Only the market candlestick type is supported. Passing mark, index, or premium falls back to market without returning an error.
  • Only the 1m, 5m, 15m, 1H, 4H, 1D intervals are supported. Passing an unsupported interval returns a parameter error.

HTTP Request​

  • GET /api/v3/market/history-candles
  • Rate limit: 20/sec/IP
Request
curl "https://api.bitget.com/api/v3/market/history-candles?category=USDT-FUTURES&symbol=BTCUSDT&interval=1D&limit=10"

Request Parameters​

ParameterTypeRequiredComments
categoryStringYesProduct Type
SPOT Spot trading
USDT-FUTURES USDT futures
COIN-FUTURES Coin-M futures
USDC-FUTURES USDC futures
symbolStringYesSymbol name
e.g.,BTCUSDT
intervalStringYesGranularity
1m,3m,5m,15m,30m,1H,4H,6H,12H,1D
startTimeStringNoStart timestamp
A Unix millisecond timestamp, e.g.,1672410780000
Request data after this start time (the maximum time query range is 90 days)
endTimeStringNoEnd timestamp
A Unix millisecond timestamp, e.g.,1672410781000
Request data before this end time (the maximum time query range is 90 days)
typeStringNoCandlestick type
market, mark, index, premium. Default: market
limitStringNoLimit per page
Default:100. Maximum: 100
Response
{
"code": "00000",
"msg": "success",
"requestTime": 1695865864944,
"data": [
[
"1687708800000",
"27176.93",
"27177.43",
"27166.93",
"27177.43",
"2990.08",
"81246917.3294"
],
[
"1688313600000",
"27177.43",
"27177.43",
"24000",
"24001",
"2989.1",
"72450031.0448"
]
]
}

Response Parameters​

ParameterTypeComments
>index[0]StringThe timestamp that the system generated the data
>index[1]StringOpen price
>index[2]StringHighest price
>index[3]StringLowest price
>index[4]StringClose price
>index[5]StringVolume. The unit is base coin
>index[6]StringTurnover. The unit is quote coin

How was your Reading Experience with us?

★
★
★
★
â˜