Skip to content

Kline Data

Kline data

Http Request

GET
/api/spot/instruments/candles

Request Frequency Restriction:

  • 4times / 1second

Postman

pay attention to replace "restful_base_endpoint"

curl --location 'restful_base_endpoint/api/spot/instruments/candles?instrument_id=BTC/USDT&period=D'

Request Parameters

Name Type Mandatory Description
instrument_id string YES currency pair, such as BTC/USDT
start_time string NO the start time, and the iso8601 format timestamp is seconds
end_time string NO the deadline. The iso8601 format timestamp is seconds
period string YES Kline. Please refer to the description for the value range

Tip

The value of period can only be "1", "3", "5", "15", "30", "60", "120", "240", "360", "720", "D", "W", "M"], otherwise the request will be rejected.

Corresponding to [1min, 3min, 5min, 15min, 30min, 1 hour, 2 hour, 4 hour, 6 hour, 12 hour, 1 day, 1 week, 1 month]

Response fields description

Format: [timestamp, open, high, low, close, volume]

Response

{
    "code":200,
    "message":null,
    "data":[
      [
        "1681725600000",
        "29878.69",
        "29888.18",
        "29813.94",
        "29813.94",
        "141.7435"
      ],
      [
        "1681722000000",
        "29917.63",
        "29922.94",
        "29849.15",
        "29878.69",
        "110.3269"
      ],
      [
        "1681718400000",
        "29838.03",
        "29919.2",
        "29811.07",
        "29917.63",
        "185.1527"
      ]
    ]
}