Introduction
Kaiko provides live and historical institutional quality market data for digital assets. Our service retrieves and validates millions of trades each day from the world's leading cryptocurrency exchanges to deliver robust and reliable market data to financial institutions globally.
Kaiko currently provides two HTTP APIs:
- Reference Data (Public)
- Market Data (Authenticated)
Making Requests
When interacting with Kaiko HTTP APIs, you are expected to pass two headers:
Accept: application/json
: API responses will be in JSON format.Accept-Encoding: gzip
: All our endpoints benefit from use of compression.
curl --compressed -H 'Accept: application/json' 'https://<api_hostname>/<endpoint>'
Timestamps
Input
All time parameters are in UTC and returned in the following ISO 8601 datetime format:
YYYY-MM-DD
Thh:mm:ss.sss
Z
For example:
2017-12-17T13:35:24.351Z
The "T" separates the date from the time. The trailing "Z" indicates UTC time.
Output
All timestamps are returned as millisecond Unix timestamps (the number of milliseconds elapsed since 1970-01-01 00:00:00.000 UTC). For metadata fields, times are also returned in millisecond-resolution ISO 8601 datetime strings in the same format as input for convenience.
Market open and close
Digital asset exchanges operate approximately 24x7x365.
For daily aggregated data, the opening price is calculated as the first trade at or after 00:00:00 UTC. The closing price is calculated as the last trade prior to 00:00:00 UTC.
Reference Data API
Endpoints
The base URL for the Reference Data Endpoints is: https://reference-data-api.kaiko.io/
. Authentication is not required.
Assets
Request Example
curl --compressed -H 'Accept: application/json' 'https://reference-data-api.kaiko.io/v1/assets'
Response Example
{
"result": "success",
"data": [
{
"code": "btc",
"name": "Bitcoin",
"asset_class": "cryptocurrency"
},
{
"code": "bch",
"name": "Bitcoin Cash",
"asset_class": "cryptocurrency"
},
{
"code": "jpy",
"name": "Japanese Yen",
"asset_class": "fiat"
},
/* ... */
]
}
This endpoint retrieves a list of supported assets.
HTTP request
GET https://reference-data-api.kaiko.io/v1/assets
Parameters
No parameters supported.
Fields
Field | Description |
---|---|
code |
Identifier for the asset. |
name |
|
asset_class |
fiat ,cryptocurrency |
Exchanges
Request Example
curl --compressed -H 'Accept: application/json' 'https://reference-data-api.kaiko.io/v1/exchanges'
Response Example
{
"result": "success",
"data": [
{
"code": "bfly",
"name": "bitFlyer",
"kaiko_legacy_slug": "bl"
},
{
"code": "bfnx",
"name": "Bitfinex",
"kaiko_legacy_slug": "bf"
}
/* ... */
]
}
This endpoint retrieves a list of supported exchanges.
HTTP request
GET https://reference-data-api.kaiko.io/v1/exchanges
Parameters
No parameters supported.
Fields
Field | Description |
---|---|
code |
Identifier for the exchange. |
name |
|
kaiko_legacy_slug |
Identifier used in past deliveries of historical market data. |
Instruments
Request Example
curl --compressed -H 'Accept: application/json' 'https://reference-data-api.kaiko.io/v1/instruments'
Response Example
{
"result": "success",
"data": [
{
"exchange_code": "bfnx",
"class": "spot",
"code": "xmr-btc",
"base_asset": "xmr",
"quote_asset": "btc",
"kaiko_legacy_exchange_slug": "bf",
"kaiko_legacy_symbol": "xmrbtc",
"exchange_pair_code": "xmrbtc",
"trade_start_time": "2017-08-09T23:36:33.0000000Z",
"trade_start_timestamp": 1502321793000,
"trade_end_time": null,
"trade_end_timestamp": null,
"trade_count": 1669022,
"trade_compressed_size": 22107372
},
{
"exchange_code": "krkn",
"class": "spot",
"code": "gno-eth",
"base_asset": "gno",
"quote_asset": "eth",
"kaiko_legacy_exchange_slug": "kk",
"kaiko_legacy_symbol": "gnoeth",
"exchange_pair_code": "GNOETH",
"trade_start_time": "2017-08-08T20:10:04.0000000Z",
"trade_start_timestamp": 1502223004345,
"trade_end_time": null,
"trade_end_timestamp": null,
"trade_count": 230316,
"trade_compressed_size": 11588434
},
{
"exchange_code": "krkn",
"class": "spot",
"code": "dao-btc",
"base_asset": "dao",
"quote_asset": "btc",
"kaiko_legacy_exchange_slug": "kk",
"kaiko_legacy_symbol": "daobtc",
"exchange_pair_code": "xdaoxxbt",
"trade_start_time": "2016-05-28T10:20:40.0000000Z",
"trade_start_timestamp": 1464430840433,
"trade_end_time": "2016-12-18T02:47:47.0000000Z",
"trade_end_timestamp": 1482029267877,
"trade_count": 67925,
"trade_compressed_size": 4194980
},
/* ... */
]
}
This endpoint retrieves a list of supported instruments. There are three possible cases regarding the trading period:
- Trading has started and new trading activity is still being consumed (start time fields will be set, but end time fields will be
null
) - Trading has been recorded but no recent activity has been seen (both start and end time fields are set)
- No trading has been registered yet (both start and end time fields are
null
)
HTTP request
GET https://reference-data-api.kaiko.io/v1/instruments
Parameters
No parameters supported.
Fields
Field | Description |
---|---|
exchange_code |
Exchange code . |
class |
spot |
code 2 |
Kaiko identifier for the instrument. Always base_asset-quote_asset for spot instruments. |
base_asset 1 |
Base asset. |
quote_asset 1 |
Quote asset. |
kaiko_legacy_exchange_slug |
Exchange kaiko_legacy_slug . |
kaiko_legacy_symbol |
Identifier used in past deliveries of historical market data and Data Feed. |
exchange_pair_code 2 |
Identifier for the instrument used by the exchange. |
trade_start_time |
Time of first available trade in Kaiko's data set. |
trade_start_timestamp |
Timestamp of first available trade in Kaiko's data set. |
trade_end_time |
Time of last available trade in Kaiko's data set. null if trades |
trade_end_timestamp |
Timestamp of first available trade in Kaiko's data set. |
trade_count |
Total number of trades available through Kaiko Market Data API and Data Feed. For active pairs, this is an approximation. |
trade_compressed_size |
Approximate size in bytes of all available trades in Kaiko Data Feed. |
*1: Some exchanges may refer to base and quote currencies differently. Kaiko denotes prices in units of quote and volume in units of base, as reported by exchanges. * *2: Some exchanges reverse the ordering of base/quote in their codes. *
Data Feed
Receive historical and on-going data directly to your cloud provider. If you purchased a monthly subscription of Trade Data, 10% Order Books, OHLCV or VWAP, your data will be delivered once a day to your cloud bucket. We support Amazon Web Services S3, Google storage, Azure blob storage, and other providers. Cloud storage services allow us to easily synchronize our data with you once a day.
Cloud providers offer extensive storage services that will help you store large amounts of data. This eases the integration setup to feed whatever system you choose to integrate the data with.
If you do not already have a cloud provider, we suggest working with Amazon Web Services which is a major provider with a strong track record.
AWS S3 - How to receive our data through
- Open https://s3.console.aws.amazon.com/s3/buckets/
- Create a new bucket in the region of your choice. We suggest calling the bucket kaiko-delivery-nameofyourcompany
- We suggest you use the us-east-1 (N. Virginia) region unless you are already using a different region as your main presence
- Leave the properties on the default setting, finish the review and click on 'Create bucket'
- After creating the bucket, click on it and navigate to the 'Permissions' tab. Click on 'Access Control List' to set the right permissions.
- Under Access for other AWS accounts, press Add account and use the following id:
4d6be087cf0b9ee7af2f8d8c51469c81bc711e68ee9c6be386aee2322abc8175
- Check all the checkboxes for permissions and press Save
- Ensure that the permissions dialog resembles the following:
- Enter the details into this form
- You should receive a confirmation email within a few working days confirming that the integration was set up correctly
GCS - How to receive our data through
- Open https://console.cloud.google.com/storage/
- We suggest calling the bucket kaiko-delivery-nameofyourcompany
- Once created, click on the "3 dots" on the right side of the corresponding bucket
- Click on Edit bucket permissions :
- Press Add members and add our service account
kaiko-facteur@kaiko-facteur.iam.gserviceaccount.com
- Press on Select a role, select Storage, then select Storage Admin as follow :
- Press on Add to validate the changes
- Enter the details into this form
- You should receive a confirmation email within a few working days confirming that the integration was set up correctly
For other cloud providers
Please contact us at hello@kaiko.com.
Market Data API
Endpoints
The base URL for the Market Data Endpoints is regionalized. We are currently offering endpoints in the US and in Europe:
https://us.market-api.kaiko.io/
https://eu.market-api.kaiko.io/
Usage
Authentication
Request Syntax
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://<api_hostname>/<endpoint>'
Each API lives under its own hostname. Clients must include an API key in the header of every request they make. The format is as follows:
X-Api-Key: <client-api-key>
Data versioning
Kaiko takes transparency and accountability very seriously. Therefore, our provided datasets are versioned. Dataset versioning is orthogonal to API versioning. Any potential breaking changes in results (e.g. semantical changes or corrections of historically incorrect data) will result in a new dataset version - no corrections or adjustments will be done in the dark. Addition of new data will not result in a new dataset version. Data is versioned on a per-base-data level.
The versioning is selected by selecting a base data set and a version. All current Market Data API endpoints take the commodity
and data_version
parameters.
By setting this to latest
, you will get the most recent version. The returned version is always included in the query
field and can be referred to if you would ever need to compare results, should we ever need to adjust historical data. Paginating over a request with version set to latest
will preserve the current version across subsequent pagination requests.
We recommend using the most current version explicitly in production integrations as the latest
label might move at any time to a breaking change. For the trades
commodity the latest version is currently v1
Response Example
{
"timestamp": 1540474596175,
"trade_id": "68024786",
"price": "6559.84000000",
"amount": "0.00646600",
"taker_side_sell": true
}
Buy/Sell, Maker/Taker sides
For trades, the way exchanges report on the type of trade varies greatly. Some exchanges only report whether a trade was a buy or sell, without specifying which side the trade is actually referring to. Others do specify the side the trade is referring to. With the following mapping, we try to rule out any ambiguous interpretation of the taker_side_sell
field in our trade endpoints. This mapping is in reference to what the exchanges are reporting via their APIs and documentation, and, in some cases correspondence between Kaiko and the exchanges.
Maker side
The following exchanges report trades from the perspective of maker orders. In all below cases, it was the maker who was selling.
Exchange | Notation | Kaiko taker_side_sell: true equivalent to: |
Comment |
---|---|---|---|
Binance1 | "m": true, false |
"m": true |
|
Coinbase Pro1 2 | "side": "buy" or "sell" |
"side": "sell" |
|
Gemini2 | "type": "buy" or "sell" |
"type": "sell" |
|
ZB.com2 | "type": "buy" or "sell" |
"type": "sell" |
1 Explicitly stated in docs
2 Confirmed by exchange
Taker side
The following exchanges report trades from the perspective of taker orders. In all below cases, it was the taker who was selling.
Exchange | Notation | Kaiko taker_side_sell: true equivalent to: |
Comment |
---|---|---|---|
Bitfinex2 | "type": "sell" or "buy" |
"type":"sell" |
|
Ethfinex2 | "type": "sell" or "buy" |
"type":"sell" |
|
Huobi2 | "direction": "buy" or "sell" |
"direction": "sell" |
|
Kraken2 | "b" (buy) "s" (sell) |
"s" |
|
BitMEX2 | "side": "Sell" or "Buy" |
"side": "Sell" |
|
Gatecoin2 | way: "bid" or "ask" |
way: "ask" |
|
Quoine1 | taker_side: "buy" or "sell" |
inverse notation: taker_side: "buy" |
Incorrect notation by Kaiko. Taker was buying. |
1 Explicitly stated in docs
2 Confirmed by exchange
Taker / Maker side unspecified
The following exchanges do not report on the side of the trades.
Exchange | Notation | Kaiko taker_side_sell: true equivalent to: |
Comment |
---|---|---|---|
bitFlyer | "side": "BUY" or "SELL" |
"side": "SELL" |
|
Bithumb | "type": "bid" or "ask" |
inverse notation: "type": "bid" |
Incorrect notation by Kaiko. Was buy order. |
Bitstamp2 | type: 0 (buy) or 1 (sell) |
type: 1 |
|
Bittrex | "OrderType": "SELL" or "BUY" |
OrderType: SELL |
|
Bit-Z | "s": "buy" or "sell" |
"s": "sell" |
|
BTCBOX2 | "type": "buy" or "sell" |
"type":"sell" |
|
BTC38 | "type": "buy" or "sell" |
"type":"sell" |
API not live anymore |
CEX.io2 | type: "buy" or "sell" |
type: "sell" |
|
EXX | trade_type": "bid" or "ask" |
trade_type: "sell" |
|
HitBTC2 | "side": "buy" or "sell" |
"side": "sell" |
|
OKEx | "type": "buy" or "sell" |
type: "sell" |
|
OKCoin | "type": "buy" or "sell" |
type: "sell" |
|
Poloniex | type: "buy" or "sell" |
type: "sell" |
|
WEX.nz (BTC-e) | type: "bid" or "ask" |
type: "ask" |
|
Yobit | "type": "bid" or "ask" |
inverse notation: "type":"bid |
Incorrect notation by Kaiko. Was buy order. |
Zaif | trade_type": "bid" or "ask" |
trade_type: "ask" |
1 Explicitly stated in docs
2 Confirmed by exchange
Taker / Maker not applicable
Exchange | Notation | Kaiko taker_side_sell: true equivalent to: |
Comment |
---|---|---|---|
itBit | Unspecified | N/A | No data on type, nor side of orders. Kaiko alwayes returns true |
Coinone | "is_ask": "0"(buy)/"1"(sell) |
N/A | No data on side tracked by Kaiko yet. |
Korbit | Unspecified | N/A | No data on type, nor side of orders. Kaiko returns empty field. |
Envelope
Response Example
{
"result": "success",
"time": "2018-06-14T17:19:40.303Z",
"timestamp": 1528996780303,
"query": { /* ... */ },
"data": [ /* ... */ ]
}
All API responses are in JSON format. A result
field, with a value of success
or error
is returned with each request. In the event of an error, a message
field will provide an error message.
Key | Data type | Description |
---|---|---|
data |
[] | {} |
Response result data. |
message |
string |
Error message, if query was not successful. |
query |
{} |
All handled query parameters echoed back. |
result |
string |
success if query successful, error otherwise. |
time |
string |
The current time at our endpoint. |
timestamp |
long |
The current time at our endpoint. |
Pagination
Pagination Example
{
"result": "success",
"time": "2018-06-14T17:19:40.303Z",
"timestamp": 1528996780303,
"query": {...},
"data": [...],
"continuation_token": "ab25lIG1vcmUgYmVlciBpcyBvbmUgbW9yZSBiZWVyIHRvbyBtYW55",
"next_url": "https://<eu|us>.market-api.kaiko.io/v1/trades.v1/exchanges/bfnx/spot/btc-usd/trades?continuation_token=ab25lIG1vcmUgYmVlciBpcyBvbmUgbW9yZSBiZWVyIHRvbyBtYW55"
}
For queries that result in a larger dataset than can be returned in a single response, a continuation_token
field is included. Calling the same endpoint again with the continuation_token
query parameter added will return the next result page. For convenience, a next_url
field is also included, containing a URL that can be called directly to get the next page. Paginated endpoints also takes a page_size
parameter that specifies the maximum number of items that should be included in each response. Only the first call should include page_size
, all subsequent calls should only use continuation_token
. Paginating over a request with version set to latest
will preserve the current version across subsequent pagination requests.
Parameters
Parameter | Required | Description |
---|---|---|
continuation_token |
No | |
page_size |
No | Maximum number of records to return in one response |
Errors
All API responses are in JSON format. A result
field, with a value of success
or error
is returned with each request. In the event of an error, a message
field will provide an error message.
HTTP error codes
The Kaiko platform API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request |
401 | Unauthorized -- You are not authenticated properly. See Authentication. |
403 | Forbidden -- You don't have access to the requested resource. |
404 | Not Found |
405 | Method Not Allowed |
406 | Not Acceptable |
429 | Too Many Requests -- Rate limit exceeded. Contact us if you think you have a need for more. |
500 | Internal Server Error -- We had a problem with our service. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. |
Historical Trades
Request Example
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/bfnx/spot/btc-usd/trades'
Response Example
{
"query": {
"data_version": "v1",
"commodity": "trades",
"page_size": 100,
"exchange": "bfnx",
"instrument_class": "spot",
"instrument": "btc-usd",
"request_time": "2019-01-22T15:47:47.655Z"
},
"time": "2019-01-22T15:47:47.721Z",
"timestamp": 1548172067721,
"data": [
{
"timestamp": 1364774869000,
"trade_id": "63018",
"price": "93.3",
"amount": "80.62851795",
"taker_side_sell": null
},
{
"timestamp": 1364774893000,
"trade_id": "63020",
"price": "100.0",
"amount": "20.0",
"taker_side_sell": null
},
/* ... */
],
"result": "success",
"continuation_token": "rbd28vrmb1cwaxfykuJBKAABhNi1Bfv1EY55P3QPSnYnm8VuX1LqLhA2d3yVfYgMKtfBYxJg7sHrkTfkQGysW23Lm9Lp9rsVpVk2Esmgz9VQZvNE4xWN8hh3LgLrCa7ty4B3YGCwtH",
"next_url": "https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/bfnx/spot/btc-usd/trades?continuation_token=rbd28vrmb1cwaxfykuJBKAABhNi1Bfv1EY55P3QPSnYnm8VuX1LqLhA2d3yVfYgMKtfBYxJg7sHrkTfkQGysW23Lm9Lp9rsVpVk2Esmgz9VQZvNE4xWN8hh3LgLrCa7ty4B3YGCwtH"
}
This endpoint retrieves trades for an instrument on a specific exchange. By default returns the 100 first trades in our dataset. Trades are sorted by time, ascendingly. Note that taker_side_sell
can be null in the cases where this information was not available at collection.
HTTP request
GET https://<eu|us>.market-api.kaiko.io/v1/data/{commodity}.{data_version}/exchanges/{exchange}/{instrument_class}/{instrument}/trades{?start_time,end_time,page_size,continuation_token}
Parameters
Parameter | Required | Description |
---|---|---|
continuation_token |
No | See Pagination. |
end_time 1 |
No | Ending time in ISO 8601 (exclusive). |
exchange |
Yes | Exchange code . See Exchanges Reference Data Endpoint. |
instrument_class |
Yes | Instrument class . See Instruments Reference Data Endpoint. |
instrument |
Yes | Instrument code . See Instruments Reference Data Endpoint. |
page_size 1 |
No | See Pagination (min: 1, default: 100, max: 100000). |
start_time 1 |
No | Starting time in ISO 8601 (inclusive). |
commodity |
Yes | The data commodity. |
data_version |
Yes | The data version. (v1, v2 ... or latest) |
1: When paginating, these parameters should only be included in the first request. For subsequent requests, they are encoded in the continuation token.
Recent Trades
Request Example
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/krkn/spot/eth-eur/trades/recent'
Response Example
{
"query": {
"data_version": "v1",
"commodity": "trades",
"exchange": "krkn",
"instrument_class": "spot",
"instrument": "eth-eur",
"limit": 100,
"request_time": "2019-01-24T09:41:03.035Z"
},
"time": "2019-01-24T09:41:03.065Z",
"timestamp": 1548322863065,
"data": [
{
"timestamp": 1548322820041,
"trade_id": "23f4328e31049e8175385fdee4492f12878cdcf22e1c1ab47cf013f767762aae",
"price": "101.49000",
"amount": "18.48254949",
"taker_side_sell": true
},
{
"timestamp": 1548322820035,
"trade_id": "58f1981dcaef3c65389b2c5c1039fa88bb0b6f960ebc690f2ca0d46107f2d92f",
"price": "101.50000",
"amount": "11.00000000",
"taker_side_sell": true
},
/* ... */
],
"result": "success"
}
This endpoint retrieves the most recent trades for an instrument on a specific exchange. By default returns the 100 most recent trades. This endpoint does not support pagination. Trades are sorted by time, descendingly. Note that taker_side_sell
can be null in the cases where this information was not available at collection.
HTTP request
GET https://<eu|us>.market-api.kaiko.io/v1/data/{commodity}.{data_version}/exchanges/{exchange}/{instrument_class}/{instrument}/trades/recent{?limit}
Parameters
Parameter | Required | Description |
---|---|---|
exchange |
Yes | Exchange code . See Exchanges Reference Data Endpoint. |
instrument_class |
Yes | Instrument class . See Instruments Reference Data Endpoint. |
instrument |
Yes | Instrument code . See Instruments Reference Data Endpoint. |
limit |
No | Maximum number of results (min: 1, default: 100, max: 10000). |
commodity |
Yes | The data commodity. |
data_version |
Yes | The data version. (v1, v2 ... or latest) |
OHLCV (Candles)
Request Example
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/ohlcv'
Response Example
{
"query": {
"data_version": "v1",
"commodity": "trades",
"page_size": 100,
"exchange": "krkn",
"instrument_class": "spot",
"instrument": "btc-usd",
"interval": "1d",
"aggregation": "ohlcv",
"request_time": "2019-01-22T15:56:32.165Z"
},
"time": "2019-01-22T15:56:32.277Z",
"timestamp": 1548172592277,
"data": [
{
"timestamp": 1381017600000,
"open": "122.0",
"high": "122.0",
"low": "122.0",
"close": "122.0",
"volume": "0.1"
},
{
"timestamp": 1381104000000,
"open": "123.61",
"high": "123.61",
"low": "123.61",
"close": "123.61",
"volume": "0.1"
},
/* ... */
],
"result": "success",
"continuation_token": "rbd2bcDp35GmDscQbvZ9YzQHZJkT3jdeFx9fSBDdVmcCZaHvQRTCTfmfQ6QCrvDNp5ciRRuGPTedVL5LMZv1qmSXhRpZFbpvBW2uA62RSYpfJ1hVykJKZfhtmXXrxz",
"next_url": "https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/krkn/spot/btc-usd/aggregations/ohlcv?continuation_token=rbd2bcDp35GmDqdfaz3fZJkT3jdeFx9fSBDdVmcCZaHvQRTCTfmfQ6QCrvDNp5ciRRuGPTedVL5LMZv1qmSXhRpZFbpvBW2uA62RSYpfJ1hVykJKZfhtmXXrxz"
}
This endpoint retrieves aggregated history for an instrument on an exchange. Returns the earliest available intervals by default. The interval
parameter is suffixed with s
, m
, h
or d
to specify seconds, minutes, hours or days, respectively. Values are sorted by time, ascendingly.
HTTP request
GET https://<eu|us>.market-api.kaiko.io/v1/data/{commodity}.{data_version}/exchanges/{exchange}/{instrument_class}/{instrument}/aggregations/ohlcv{?interval,start_time,end_time,page_size,continuation_token}
Parameters
Parameter | Required | Description |
---|---|---|
continuation_token |
No | See Pagination. |
end_time 1 |
No | Ending time in ISO 8601 (exclusive). |
exchange |
Yes | Exchange code . |
instrument_class |
Yes | Instrument class . See Instruments Reference Data Endpoint. |
instrument |
Yes | Instrument code . See Instruments Reference Data Endpoint. |
interval |
No | Interval period. Default 1d . |
page_size 1 |
No | See Pagination (min: 1, default: 100, max: 100000). |
start_time 1 |
No | Starting time in ISO 8601 (inclusive). |
commodity |
Yes | The data commodity. |
data_version |
Yes | The data version. (v1, v2 ... or latest) |
1: When paginating, these parameters should only be included in the first request. For subsequent requests, they are encoded in the continuation token.
Fields
Field | Description |
---|---|
open |
Opening price of interval. |
high |
Highest price during interval. |
low |
Lowest price during interval. |
close |
Closing price of interval. |
volume |
Volume traded in interval. |
Intervals
The following intervals are currently supported: 1m
, 2m
, 3m
, 5m
, 10m
, 15m
, 30m
, 1h
, 2h
, 3h
, 4h
, 1d
.
VWAP (Prices)
Request Example
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/vwap'
Response Example
{
"query": {
"commodity": "trades",
"data_version": "v1",
"page_size": 100,
"exchange": "cbse",
"instrument_class": "spot",
"instrument": "btc-usd",
"interval": "1d",
"aggregation": "vwap",
"request_time": "2018-10-17T12:39:58.365Z"
},
"time": "2018-10-17T12:39:58.542Z",
"timestamp": 1539779998542,
"data": [
{
"timestamp": 1417392000000,
"price": "345.24557275909663315035096473307477923471334550072"
},
{
"timestamp": 1417478400000,
"price": "377.99517104491927319230564288378536793307401289498"
},
/* ... */
],
"result": "success",
"continuation_token": "55qoNvASfrVdCIjrF8Ygw6TVJ4yamzUyeL9QXAmvWZZur3iaKoPcVBW1V4unNJi2zMjojbsYr9Pgt9XFCUpnAiuBiECm8X4cedvYc9t2WxHXnHKjgAp2wRAeV8ZPUSj8WNgpWTCBVymGaQZPj3oMDZwVeCPyuTLFdVPfTXVjZA94BtHeBmghoPv92JtWxN3yRvCkrw79hJBu",
"next_url": "https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/vwap?continuation_token=55qoNvASfrVdCIjrF8Ygw6TVJ4yamzUyeL9QXAmvWZZur3iaKoPcVBW1V4unNJi2zMjojbsYr9Pgt9XFCUpnAiuBiECm8X4cedvYc9t2WxHXnHKjgAp2wRAeV8ZPUSj8WNgpWTCBVymGaQZPj3oMDZwVeCPyuTLFdVPfTXVjZA94BtHeBmghoPv92JtWxN3yRvCkrw79hJBu"
}
This endpoint retrieves aggregated price history for an instrument on an exchange. Returns the earliest available intervals by default. The interval
parameter is suffixed with s
, m
, h
or d
to specify seconds, minutes, hours or days, respectively. Values are sorted by time, ascendingly.
HTTP request
GET https://<eu|us>.market-api.kaiko.io/v1/data/{commodity}.{data_version}/exchanges/{exchange}/{instrument_class}/{instrument}/aggregations/vwap{?interval,start_time,end_time,page_size,continuation_token}
Parameters
Parameter | Required | Description |
---|---|---|
continuation_token |
No | See Pagination. |
end_time 1 |
No | Ending time in ISO 8601 (exclusive). |
exchange |
Yes | Exchange code . |
instrument_class |
Yes | Instrument class . See Instruments Reference Data Endpoint. |
instrument |
Yes | Instrument code . See Instruments Reference Data Endpoint. |
interval |
No | Interval period. Default 1d . |
page_size 1 |
No | See Pagination (min: 1, default: 100, max: 100000). |
start_time 1 |
No | Starting time in ISO 8601 (inclusive). |
commodity |
Yes | The data commodity. (trades ) |
data_version |
Yes | The data version. (v1 , v2 ... or latest ) |
1: When paginating, these parameters should only be included in the first request. For subsequent requests, they are encoded in the continuation token.
Fields
Field | Description |
---|---|
price |
Volume-weighted average price. |
Intervals
The following intervals are currently supported: 1m
, 2m
, 3m
, 5m
, 10m
, 15m
, 30m
, 1h
, 2h
, 3h
, 4h
, 1d
.
COUNT OHLCV VWAP
Request Example
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/count_ohlcv_vwap'
Response Example
{
"query": {
"commodity": "trades",
"data_version": "v1",
"page_size": 100,
"exchange": "bfnx",
"instrument_class": "spot",
"instrument": "xmr-usd",
"interval": "1d",
"aggregation": "count_ohlcv_vwap",
"request_time": "2018-10-17T13:11:00.639Z"
},
"time": "2019-01-22T12:24:01.258Z",
"timestamp": 1548159841258,
"data": [
{
"timestamp": 1417392000000,
"count": 4,
"open": "300.0",
"high": "370.0",
"low": "300.0",
"close": "370.0",
"volume": "0.05655554",
"price": "345.24557275909663315035096473307477923471334550072"
},
{
"timestamp": 1417478400000,
"count": 8,
"open": "377.0",
"high": "378.0",
"low": "377.0",
"close": "378.0",
"volume": "15.0136",
"price": "377.99517104491927319230564288378536793307401289498"
},
/* ... */
],
"result": "success",
"continuation_token": "rbd1XbkjMwv2SyUfvJwsqFGmCKzg3WToTvqigui1bejckYnxd9DM1V3v58iqMCdXa4dJSXap6p6fBuvzz32tiHVrv5LC76MyRyYNbZyvSEoVzd1krSWWeXYEtEtR",
"next_url": "https://<eu|us>.market-api.kaiko.io/v1/data/trades.v1/exchanges/cbse/spot/btc-usd/aggregations/count_ohlcv_vwap?continuation_token=rbd1XbkjMwv2SyUfvJwsui1bejckYnxd9DM1V3v58iqMCdXa4dJSXap6p6fBuvzz32tiHVrv5LC76MyRyYNbZyvSEoVzd1krSWWeXYEtEtR"
}
This endpoint retrieves aggregated history for an instrument on an exchange. Returns the earliest available intervals by default. The interval
parameter is suffixed with s
, m
, h
or d
to specify seconds, minutes, hours or days, respectively. Values are sorted by time, ascendingly.
HTTP request
GET https://<eu|us>.market-api.kaiko.io/v1/data/{commodity}.{data_version}/exchanges/{exchange}/{instrument_class}/{instrument}/aggregations/count_ohlcv_vwap{?interval,start_time,end_time,page_size,continuation_token}
Parameters
Parameter | Required | Description |
---|---|---|
continuation_token |
No | See Pagination. |
end_time 1 |
No | Ending time in ISO 8601 (exclusive). |
exchange |
Yes | Exchange code . |
instrument_class |
Yes | Instrument class . See Instruments Reference Data Endpoint. |
instrument |
Yes | Instrument code . See Instruments Reference Data Endpoint. |
interval |
No | Interval period. Default 1d . |
page_size 1 |
No | See Pagination (min: 1, default: 100, max: 100000). |
start_time 1 |
No | Starting time in ISO 8601 (inclusive). |
commodity |
Yes | The data commodity. |
data_version |
Yes | The data version. (v1, v2 ... or latest) |
1: When paginating, these parameters should only be included in the first request. For subsequent requests, they are encoded in the continuation token.
Fields
Field | Description |
---|---|
trade_count |
Then number of trades. |
open |
Opening price of interval. |
high |
Highest price during interval. |
low |
Lowest price during interval. |
close |
Closing price of interval. |
volume |
Volume traded in interval. |
Intervals
The following intervals are currently supported: 1m
, 2m
, 3m
, 5m
, 10m
, 15m
, 30m
, 1h
, 2h
, 3h
, 4h
, 1d
.
Future development
We are continously extending the feature set across all our products. We are very happy to receive your feedback on our services and documentation. Do you have a proposal on how we can make your day better? Give us a shout! :)