curl --request POST \
--url https://api.hyperliquid.xyz/info \
--header 'Content-Type: application/json' \
--data '{
"type": "candleSnapshot",
"req": {
"coin": "BTC",
"interval": "1h",
"startTime": 1754300000000,
"endTime": 1754400000000
}
}'
[
{
"T": 1681924499999,
"c": "29258.0",
"h": "29309.0",
"i": "15m",
"l": "29250.0",
"n": 189,
"o": "29295.0",
"s": "BTC",
"t": 1681923600000,
"v": "0.98639"
}
]
Retrieve historical candlestick (OHLCV) data for a specific asset within a time range. Only the most recent 5000 candles are available.
curl --request POST \
--url https://api.hyperliquid.xyz/info \
--header 'Content-Type: application/json' \
--data '{
"type": "candleSnapshot",
"req": {
"coin": "BTC",
"interval": "1h",
"startTime": 1754300000000,
"endTime": 1754400000000
}
}'
[
{
"T": 1681924499999,
"c": "29258.0",
"h": "29309.0",
"i": "15m",
"l": "29250.0",
"n": 189,
"o": "29295.0",
"s": "BTC",
"t": 1681923600000,
"v": "0.98639"
}
]
type
(string, required) — Must be "candleSnapshot"
req
(object, required) — Request parameters:
coin
(string, required) — Asset identifier (“BTC”, “ETH” for perpetuals; “@107” for spot)interval
(string, required) — Candle interval (see supported intervals below)startTime
(integer, required) — Start time in milliseconds (epoch timestamp)endTime
(integer, required) — End time in milliseconds (epoch timestamp)t
— Open time timestamp (milliseconds)T
— Close time timestamp (milliseconds)o
— Open price (string)h
— High price (string)l
— Low price (string)c
— Close price (string)v
— Volume traded (string)n
— Number of trades (integer)i
— Interval (string)s
— Symbol (string)"1m"
, "3m"
, "5m"
, "15m"
, "30m"
, "1h"
, "2h"
, "4h"
, "8h"
, "12h"
, "1d"
, "3d"
, "1w"
, "1M"
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"type": "candleSnapshot",
"req": {
"coin": "BTC",
"interval": "1h",
"startTime": 1754300000000,
"endTime": 1754400000000
}
}' \
https://api.hyperliquid.xyz/info
Successful response with candlestick data
The response is of type object[]
.