Candlesticks

Query historical candlesticks by product and granularity / period.

Rate limits

  • Dynamic based on limit param provided (weight = 2 + limit / 10)

    • E.g: With limit=100, you can make up to 200 requests per min or 33 requests / 10 secs.

See more details in API Rate limits

Available Granularities

The following granularities / periods are supported (in seconds):

Granularity nameGranularity value (in seconds)

1 minute

60

5 minutes

300

15 minutes

900

1 hour

3600

2 hours

7200

4 hours

14400

1 day

86400

1 week

604800

4 weeks

2419200

Request

Query product candlesticks ordered by timestamp desc.

POST [ARCHIVE_ENDPOINT]

Body

{
  "candlesticks": {
    "product_id": 1,
    "granularity": 60,
    "limit": 2
  }
}

Request Parameters

ParameterTypeRequiredDescription

product_id

number

Yes

Id of product to fetch candlesticks for.

granularity

number

Yes

Granularity value in seconds.

max_time

number / string

No

When providing max_time (unix epoch in seconds), only return candlesticks with timestamp <= max_time

limit

number

No

Max number of candlesticks to return. defaults to 100. max possible of 500.

Response

{
  "candlesticks": [
    {
      "product_id": 1,
      "granularity": 60,
      "submission_idx": "627709",
      "timestamp": "1680118140",
      "open_x18": "27235000000000000000000",
      "high_x18": "27298000000000000000000",
      "low_x18": "27235000000000000000000",
      "close_x18": "27298000000000000000000",
      "volume": "1999999999999999998"
    },
    {
      "product_id": 1,
      "granularity": 60,
      "submission_idx": "627699",
      "timestamp": "1680118080",
      "open_x18": "27218000000000000000000",
      "high_x18": "27245000000000000000000",
      "low_x18": "27218000000000000000000",
      "close_x18": "27245000000000000000000",
      "volume": "11852999999999999995"
    }
  ]
}

Response Fields

Field nameDescription

submission_idx

Id of the latest recorded transaction that contributes to the candle.

product_id

Id of product candle is associated to.

granularity

Candle time interval, expressed in seconds, representing the aggregation period for trading volume and price data

open_x18

The first fill price of the candle, multiplied by 10^18

high_x18

The highest recorded fill price during the defined interval of the candle, multiplied by 10^18

low_x18

The lowest recorded fill price during the defined interval of the candle, multiplied by 10^18

close_x18

The last price of the candle, multiplied by 10^18

volume

Asset volume, which represents the absolute cumulative fill amounts during the time interval of the candle, multiplied by 10^18

Last updated