Skip to content
API reference /Market queries

Read price candles

Read two consecutive hourly ETH-SWAP candles. Each row follows the field order documented below.

Endpoint & access

GET
/api/usdt/instruments/candles

Rate limit

  • 3 requests / 1 second

Query parameters

Field Data type Required Meaning
instrument_id string YES Contract abbreviation, for example BTC, ETH, BCH, or BSV.
start_time string NO Start time as a Unix timestamp in seconds, for example 1795158000.
end_time string YES End time as a Unix timestamp in seconds.
period string YES Kline granularity. See the allowed values below.
limit integer NO Maximum number of candles. Defaults to 200 when omitted or nonpositive. Values above 1,000 are capped at 1,000.

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]

Returned fields

Each candle is an array of strings in the order [timestamp, open, high, low, close, volume, turnover, long_volume, short_volume, amplitude].

  • timestamp is the candle open time as a Unix timestamp in milliseconds.
  • volume, long_volume, and short_volume are in contracts.
  • amplitude is (high - low) / low, truncated to four decimal places.

Example request

GET /api/usdt/instruments/candles?instrument_id=ETH&start_time=1795158000&end_time=1795165200&period=60&limit=2

Example result

{
  "code": 200,
  "message": null,
  "data": [
    ["1795161600000", "2442.0", "2460.0", "2438.0", "2450.0", "12000", "293400", "7200", "4800", "0.0090"],
    ["1795158000000", "2435.0", "2448.0", "2430.0", "2442.0", "9600", "234048", "5400", "4200", "0.0074"]
  ]
}