On this page
Get historical and current klines (candles)
Returns historical klines (candles) and the current open kline (candle) for a given trading pair and interval. For websocket use: wscat -c wss://bitcoin-api.net/api/v1/prices/klines?interval=1m
Rate Limits
REST 40
req/min
WS 2
concurrent
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | no | |
interval | string | yes | |
limit | integer | no | |
from | string | no | |
to | string | no |
Responses
200 Success Response
{
"klines": [
{
// Opening time of the kline (candle) interval
"openTime": "2024-05-23T12:00:00.000Z",
// Closing time of the kline (candle) interval
"closeTime": "2024-05-23T12:01:00.000Z",
// Opening price
"open": "65000.00",
// Highest price during the interval
"high": "65100.00",
// Lowest price during the interval
"low": "64900.00",
// Closing price
"close": "65050.00",
// Trading volume during the interval
"volume": "1.25",
// Number of trades
"trades": 150,
// Whether the kline (candle) is fully closed
"isClosed": true
}
]
} 400 Bad Request
{
// Error code
"code": "VALIDATION_ERROR",
// Error message
"message": "querystring/symbol must be equal to one of the allowed values"
} 429 Too Many Requests
{
// Error code
"code": "RATE_LIMIT_EXCEEDED",
// Error message
"message": "Rate limit exceeded, retry in 1 minute"
}