Trade Count, OHLCV Candlesticks & VWAP

What is this endpoint for?

This endpoint retrieves the Trade Count, OHLCV and VWAP history for any instrument on an exchange. The interval parameter is suffixed with s, m, h or d to specify seconds, minutes, hours or days, respectively. By making use of the sort parameter, data can be returned in ascending asc (default) or descending desc order.

Endpoint

https://<eu|us>.market-api.kaiko.io/v2/data/trades.v1/exchanges/{exchange}/{instrument_class}/{instrument}/aggregations/count_ohlcv_vwap

Parameters

Fields

Request example

curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
  'https://us.market-api.kaiko.io/v2/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/count_ohlcv_vwap'

Response example

{
    "query": {
        "page_size": 100,
        "exchange": "cbse",
        "instrument_class": "spot",
        "instrument": "btc-usd",
        "interval": "1d",
        "sort": "desc",
        "aggregation": "count_ohlcv_vwap",
        "data_version": "v1",
        "commodity": "trades",
        "request_time": "2020-11-12T16:55:42.588Z"
    },
    "time": "2020-11-12T16:55:42.710Z",
    "timestamp": 1605200142710,
    "data": [
        {
            "timestamp": 1605139200000,
            "open": "15705.79",
            "high": "16185.87",
            "low": "15446.82",
            "close": "16139.93",
            "volume": "14829.124546730012",
            "price": "15880.01873841608",
            "count": 95111
        },
        {
            "timestamp": 1605052800000,
            "open": "15315.46",
            "high": "16000",
            "low": "15293.04",
            "close": "15705.79",
            "volume": "15123.844197729988",
            "price": "15664.643871798791",
            "count": 114205
        },
    /* ... */
  ],
  "result": "success",
  "continuation_token": "rbd1XbkjMwv2SyUfvJwsqFGmCKzg3WToTvqigui1bejckYnxd9DM1V3v58iqMCdXa4dJSXap6p6fBuvzz32tiHVrv5LC76MyRyYNbZyvSEoVzd1krSWWeXYEtEtR",
  "next_url": "https://<eu|us>.market-api.kaiko.io/v2/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/count_ohlcv_vwap?continuation_token=rbd1XbkjMwv2SyUfvJwsui1bejckYnxd9DM1V3v58iqMCdXa4dJSXap6p6fBuvzz32tiHVrv5LC76MyRyYNbZyvSEoVzd1krSWWeXYEtEtR",
  "access": {
    "access_range": {
      "start_timestamp": 1546300800000,
      "end_timestamp": 1577836800000
    },
    "data_range": {
      "start_timestamp": 1417391000000,
      "end_timestamp": 1577836800000
    }
  }
}

Last updated