Reference Rates - Historical

What is this endpoint for?

This endpoint returns our historical values for our Reference Rates. To subscribe to the live rate, please use Kaiko Stream. More information on the rates and its methodology can be found here.

Endpoint

https://us.market-api.kaiko.io/v2/data/index.v1/digital_asset_rates_price/{index_code}

Path Parameters

ParameterRequiredDescriptionExample

index_code

Yes

The desired rate ticker

KK_BRR_BTCUSD

Query Parameters

ParameterRequiredDescriptionExample

start_time

Yes

Starting time in ISO 8601 (inclusive).

2023-01-25T00:00:00.000Z

end_time

Yes

Ending time in ISO 8601 (exclusive).

2023-01-26T00:00:00.000Z

parameters

No

boolean. If true, returns the underlying composition data of the rate such as exchanges and calculation window Default: false

detail

No

boolean. If true, returns the underlying partition data for each publication Default: false

page_size

No

(min: 1, default: 100, max: 100000). See Pagination

Automatically included in continuation tokens.

continuation_token

No

Fields

FieldDescriptionExample

interval_start

Starting timestamp of calculation window

2023-01-25T01:01:00.000Z

interval_end

Ending timestamp of calculation window

2023-01-25T01:02:00.000Z

price

Price of the reference rate at interval_end

67685.61363636363

parameters

Underlying composition data of the rate such as exchanges and calculation window

'asset': 'btc',

'exchanges': ['cbse', 'gmni', 'krkn', 'lmax', 'stmp'],

'calc_window': 300

detail

Underlying partition data for each publication including price, volume, trade count and underlying data of the trade selected from the partition.

'partition': 0,

'price': 67678,

'volume': 5.14445852,

'count': 125,

'underlying_trade': {'datetime': '2024-10-27T15:55:17.334Z',

'exchange': 'stmp',

'volume': 0.20137745,

'id': '366038625'}

Request examples

curl -X GET "https://us.market-api.kaiko.io/v2/data/index.v1/digital_asset_rates_price/KK_BRR_BTCUSD_LDN" \
  -H "X-API-KEY: $KAIKO_API_KEY" \
  -H "accept: application/json" \
  -G \
  --data-urlencode "start_time=2024-10-27T00:00:00.000Z" \
  --data-urlencode "end_time=2024-10-28T00:00:00.000Z" \
  --data-urlencode "parameters=True" \
  --data-urlencode "detail=True"

Response example

({'query': {'start_time': '2024-10-27T00:00:00Z',
   'start_timestamp': 1729987200000,
   'end_time': '2024-10-28T00:00:00Z',
   'end_timestamp': 1730073600000,
   'index_code': 'KK_BRR_BTCUSD_LDN',
   'sources': 'true',
   'parameters': 'true',
   'page_size': 100,
   'request_time': '2024-10-28T13:44:56.605Z',
   'data_version': 'v1',
   'commodity': 'index'},
  'time': '2024-10-28T13:44:56.605Z',
  'timestamp': 1730123096605,
  'data': [{'interval_start': '2024-10-27T15:55:00Z',
    'interval_end': '2024-10-27T16:00:00Z',
    'price': 67685.61363636363,
    'parameters': {'asset': 'btc',
     'exchanges': ['cbse', 'gmni', 'krkn', 'lmax', 'stmp'],
     'calc_window': 300},
    'detail': [{'partition': 0,
      'price': 67678,
      'volume': 5.14445852,
      'count': 125,
      'underlying_trade': {'datetime': '2024-10-27T15:55:17.334Z',
       'exchange': 'stmp',
       'volume': 0.20137745,
       'id': '366038625'}},
     {'partition': 1,
      'price': 67678,
      'volume': 1.4142475300000001,
      'count': 70,
      'underlying_trade': {'datetime': '2024-10-27T15:55:50Z',
       'exchange': 'stmp',
       'volume': 0.10075706,
       'id': '366038655'}},
...
     {'partition': 9,
      'price': 67700,
      'volume': 1.5565566199999996,
      'count': 64,
      'underlying_trade': {'datetime': '2024-10-27T15:59:43.160245Z',
       'exchange': 'krkn',
       'volume': 0.78429882,
       'id': '706541263'}}]}],
       
  "result": "success",
  "access": {
    "access_range": {
      "start_timestamp": 1279324800000,
      "end_timestamp": 1990915199000
    },
    "data_range": {
      "start_timestamp": 694224000000,
      "end_timestamp": 1990915199000
    }
  }
}

Last updated