GET /api/v1/candles
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/lighter/api/v1/candlesCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeHistorical trade OHLCV candlesticks for a market and resolution.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
market_id | query | int | required | Market ID (0 = ETH). example: 0 |
resolution | query | str1m | 5m | 15m | 1h | 4h | 12h | 1d | 1w | required | Candle resolution. example: 1h |
start_timestamp | query | int | required | Start Unix timestamp in seconds. example: 1795796426 |
end_timestamp | query | int | required | End Unix timestamp in seconds. example: 1795882826 |
count_back | query | int | required | Number of bars to return. example: 5 |
set_timestamp_to_end | query | bool | optional | Align timestamps to candle close. |
Response
type: object
data key: c
pagination: none
sample: {
"code": "int",
"r": "str",
"c": "array[24]"
}
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/lighter/api/v1/candles?market_id=0&resolution=1h&start_timestamp=1795796426&end_timestamp=1795882826&count_back=5"