Skip to main content

Side-Agnostic Candles

Type: TRADE_SIDE_AGNOSTIC_AGG | Weight: 1x | Max points: 100,000 Standard OHLCV candlestick data with combined buy + sell volume. This is the most common candle type.

Response fields

FieldTypeDescription
opendoubleOpening price
highdoubleHighest price in the interval
lowdoubleLowest price in the interval
closedoubleClosing price
volumedoubleTotal traded volume (coin by default, USD with transform)
timestampTimestampStart of the candle interval
firstTimestampTimestampTimestamp of the first trade in the interval
lastTimestampTimestampTimestamp of the last trade in the interval

Capabilities

FeatureSupportedDetails
USD denominationYestransform.normalize.quote=USD converts volume to USD
Multi-exchange aggregationYestransform.groupBy.type=GROUP_BY_TYPE_SUM with coin param
GapfillYesgapfill=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

Type: TRADE_AGG | Weight: 1x | Max points: 100,000 Candle data split by trade side. Returns separate series for buy and sell trades, giving you buy volume and sell volume independently.

Response fields

FieldTypeDescription
opendoubleOpening price
highdoubleHighest price in the interval
lowdoubleLowest price in the interval
closedoubleClosing price
volumedoubleVolume for this side (coin by default, USD with transform)
timestampTimestampStart of the candle interval
firstTimestampTimestampTimestamp of the first trade in the interval
lastTimestampTimestampTimestamp of the last trade in the interval
The series identifier includes a side field (BUY or SELL).

Capabilities

FeatureSupportedDetails
USD denominationYestransform.normalize.quote=USD
Multi-exchange aggregationYestransform.groupBy.type=GROUP_BY_TYPE_SUM with coin param
GapfillYesgapfill=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"