Skip to main content

Klines (Candlestick Data)

Endpoint: /bapi/defi/v1/public/alpha-trade/klines

Full URL Example

https://www.binance.com/bapi/defi/v1/public/alpha-trade/klines?interval=1h&limit=2&symbol=ALPHA_175USDT

Description

Fetches Kline/candlestick bars for a symbol, which include open/high/low/close prices and volume over intervals. Useful for charting and analysis.

Parameters

NameTypeMandatoryDescription
symbolSTRINGYESe.g., "ALPHA_175USDT" – use token ID from Token List
intervalSTRINGYESe.g., "1h" – supported intervals: 1s, 15s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
limitINTNOdefault 500, max 1500 – number of klines to return
startTimeLONGNOstart timestamp in milliseconds
endTimeLONGNOend timestamp in milliseconds

Response Structure

  • code: String, response status code, "000000" indicates success.
  • message: String, typically used for optional messages or errors; empty here.
  • messageDetail: String, further details about the message; empty here.
  • success: Boolean, indicates whether the request was successful; here true.
  • data: Array of arrays, each inner array contains multiple string entries representing candlestick data:
    1. Open time (timestamp in milliseconds as string), e.g., "1752642000000"
    2. Open price (string), e.g., "0.00171473"
    3. High price (string), e.g., "0.00172515"
    4. Low price (string), e.g., "0.00171473"
    5. Close price (string), e.g., "0.00172515"
    6. Volume (string), e.g., "1771.86000000"
    7. Close time (timestamp in milliseconds as string), e.g., "1752645599999"
    8. Quote asset volume (string), e.g., "3.05093481"
    9. Number of trades (integer as string), e.g., "2"
    10. Taker buy base asset volume (string), e.g., "1771.86000000"
    11. Taker buy quote asset volume (string), e.g., "3.05093481"
    12. 0 (static, please ignore)