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 freeDense 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
| name | in | type | description | |
|---|---|---|---|---|
token_id | path | str | required | Numeric internal token id for the market's base or quote token example: 147971598 |
pair_id | path | str | required | Numeric internal pair id for the market example: 97292 |
resolution | query | int | required | Bar width in SECONDS (15 = 15-second candles; minute bars via 60) default: 15example: 15 |
from_timestamp | query | int | required | Window start, unix seconds example: 1795560000 |
to_timestamp | query | int | required | Window end, unix seconds example: 1795646400 |
count_back | query | int | optional | Return at most N bars ending at to_timestamp example: 240 |
currency | query | str | optional | Candle price currency: usd | token default: usdexample: 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¤cy=usd"