GET /candlesticks/{token_id}/{pair_id}

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/geckoterminal/candlesticks/{token_id}/{pair_id}Cache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Dense sub-minute chart candles by internal numeric market ids.

Numeric ids are internal (CDP/UI-sourced) — examples document a known market. Extra for_update/is_inverted flags are optional.

Parameters

nameintypedescription
token_idpathstrrequiredNumeric internal token id for the market's base or quote token
example: 147971598
pair_idpathstrrequiredNumeric internal pair id for the market
example: 97292
resolutionqueryintrequiredBar width in SECONDS (15 = 15-second candles; minute bars via 60)
default: 15
example: 15
from_timestampqueryintrequiredWindow start, unix seconds
example: 1795560000
to_timestampqueryintrequiredWindow end, unix seconds
example: 1795646400
count_backqueryintoptionalReturn at most N bars ending at to_timestamp
example: 240
currencyquerystroptionalCandle price currency: usd | token
default: usd
example: usd

Response

type: object
data key: data
pagination: none
sample: {
  "data": "array[240]",
  "meta": "object"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/geckoterminal/candlesticks/147971598/97292?resolution=15&from_timestamp=1795560000&to_timestamp=1795646400&count_back=240&currency=usd"