Side-Agnostic Candles
Standard OHLCV candlestick data with combined buy + sell volume. This is the most common candle type.
Response fields
| Field | Type | Description |
|---|---|---|
open | double | Opening price |
high | double | Highest price in the interval |
low | double | Lowest price in the interval |
close | double | Closing price |
volume | double | Total traded volume (coin by default, USD with transform) |
timestamp | Timestamp | Start of the candle interval |
firstTimestamp | Timestamp | Timestamp of the first trade in the interval |
lastTimestamp | Timestamp | Timestamp of the last trade in the interval |
Capabilities
| Feature | Supported | Details |
|---|---|---|
| USD denomination | Yes | transform.normalize.quote=USD converts volume to USD |
| Multi-exchange aggregation | Yes | transform.groupBy.type=GROUP_BY_TYPE_SUM with coin param |
| Gapfill | Yes | gapfill=true fills missing intervals using last close price. Gapfill is only supported on candle types. |
Examples
Single exchange
Fetches 6.25 days (period=540000 seconds) of hourly candles for BTCUSDT on Binance Futures, starting from the given timestamp.
curl "https://api.kiyotaka.ai/v1/points ?type=TRADE_SIDE_AGNOSTIC_AGG &exchange=BINANCE_FUTURES &rawSymbol=BTCUSDT &interval=HOUR &from=1774800000 &period=540000" \\ -H "X-Kiyotaka-Key: YOUR_API_KEY"
Aggregated across exchanges (USD volume)
Aggregates 1 hour of hourly BTC candle data across Binance Futures, Bybit, and OKX into a single series. Volume is converted to USD so values are comparable across exchanges.
curl "https://api.kiyotaka.ai/v1/points ?type=TRADE_SIDE_AGNOSTIC_AGG &exchange=BINANCE_FUTURES &exchange=BYBIT &exchange=OKEX_SWAP &coin=BTC &interval=HOUR &from=1774800000 &period=3600 &transform.groupBy.type=GROUP_BY_TYPE_SUM &transform.normalize.quote=USD" \\ -H "X-Kiyotaka-Key: YOUR_API_KEY"
Response
{
"series": [
{
"id": {
"type": "TRADE_SIDE_AGNOSTIC_AGG",
"exchange": "BINANCE_FUTURES",
"rawSymbol": "BTCUSDT",
"normalizedSymbol": "BTC-USDT",
"category": "PERPETUAL",
"interval": "HOUR",
"coin": "BTC"
},
"points": [
{
"Point": {
"open": 66499.9,
"high": 66639.0,
"low": 66400.0,
"close": 66467.8,
"volume": 2852.8330000000055,
"timestamp": { "s": 1774800000 },
"firstTimestamp": { "s": 1774800003, "ns": 234000000 },
"lastTimestamp": { "s": 1774803599, "ns": 649000000 }
}
}
]
}
]
}
Per-Side Candles
Candle data split by trade side. Returns separate series for buy and sell trades, giving you buy volume and sell volume independently.
Response fields
| Field | Type | Description |
|---|---|---|
open | double | Opening price |
high | double | Highest price in the interval |
low | double | Lowest price in the interval |
close | double | Closing price |
volume | double | Volume for this side (coin by default, USD with transform) |
timestamp | Timestamp | Start of the candle interval |
firstTimestamp | Timestamp | Timestamp of the first trade in the interval |
lastTimestamp | Timestamp | Timestamp of the last trade in the interval |
The series identifier includes a side field (BUY or SELL).
Capabilities
| Feature | Supported | Details |
|---|---|---|
| USD denomination | Yes | transform.normalize.quote=USD |
| Multi-exchange aggregation | Yes | transform.groupBy.type=GROUP_BY_TYPE_SUM with coin param |
| Gapfill | Yes | gapfill=true fills missing intervals. Gapfill is only supported on candle types. |
Example
Fetches 1 hour of hourly per-side candles for BTCUSDT on Binance Futures. The response contains two series -- one with "side": "BUY" and one with "side": "SELL" -- each with their own OHLCV data.
curl "https://api.kiyotaka.ai/v1/points ?type=TRADE_AGG &exchange=BINANCE_FUTURES &rawSymbol=BTCUSDT &interval=HOUR &from=1774800000 &period=3600" \\ -H "X-Kiyotaka-Key: YOUR_API_KEY"