NAV Navigation
Shell

Kaiko Stream SDK v1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

At its core, Stream enables our clients to build custom market data feeds through simple and intuitive commands with a light infrastructure cost, by leveraging gRPCS Protocol and its capabilities… This first-of-its-kind data service is designed to connect institutional investors with consolidated cryptocurrency market data feeds that match the infrastructural robustness of traditional financial data products.

Code Examples

Code examples in C#, Go, Java, Node, Python, Ruby, Scala as well as the API references for each language can be found here

Base URLs:

Authentication

Instrument Selection

Kaiko’s instruments can be selected and filtered using globbing patterns, constructed from a set of parameters with optional wildcards. A single string can be used to select an arbitrary set of instruments.

Glob Patterns Examples

Assumption: Available Instruments for the subsequent examples:

[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "btc-usd"
},
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "eth-usd"
},
{
"exchange": "cbse", "instrument_class": "spot", "instrument": "eth-btc"
},
{
"exchange": "okex", "instrument_class": "future", "instrument": "btc_usd__this_week"
}
]

btc-usd spot market for krkn exchange: krkn:spot:btc-usd

[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "btc-usd"
}
]

The general format for passing a glob pattern is as follows:

pattern = <exchange>:<instrument_class>:<instrument>

Parameter Description
exchange List1 of Exchange code. See Exchanges Reference Data Endpoint.
instrument_class List1 of Instrument class. See Instruments Reference Data Endpoint.
instrument List1 of Instrument code. See Instruments Reference Data Endpoint.

1: Lists are comma separated

Wildcard

All spot markets for krkn exchange: krkn:spot:*

[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "*"
}
]

All instruments for krkn that have btc as part of the instrument code: krkn:*:*btc*

[
{
"exchange": "krkn", "instrument_class": "*", "instrument": "*btc*"
}
]

Kaiko Instrument Globbing allows the use of the wildcard *.

It can replace any parameter of the pattern:

It can also be used inside a parameter:

Cartesian Product of Patterns

All krkn and okex instruments that have usd as part of the instrument code: krkn,okex:*:*usd*

[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "btc-usd"
},
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "eth-usd"
},
{
"exchange": "okex", "instrument_class": "future", "instrument": "btc_usd__this_week"
}
]

If the params lists contain more than one element, the resulting pattern will be constructed as a cartesian product of each element of the lists, i.e:

pattern = exchange1,exchange2:instrument_class:instrument1,instrument2

will be equivalent to the union of 4 patterns:

OHLCV (Candles)

Subscribe

Retrieve ongoing Open-High-Low-Close-Volume candle updates. Supported intervals are 1s, 1m and 1h.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_ohlcv_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentCriteria":{"exchange":"string","instrumentClass":"string","code":"string"},"aggregate":"string"}'

POST /api/stream/aggregates_ohlcv_v1

Body parameter

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
},
"aggregate": "string"
}

Parameters

Name In Type Required Description
body body kaikosdkStreamAggregatesOHLCVRequestV1 true none

Example responses

200 Response

{
"result": {
"aggregate": "string",
"class": "string",
"close": "string",
"exchange": "string",
"high": "string",
"low": "string",
"open": "string",
"sequenceId": "string",
"code": "string",
"timestamp": "2019-08-24T14:15:22Z",
"uid": "string",
"volume": "string"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamAggregatesOHLCVResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamAggregatesOHLCVResponseV1 false none none

Exchange Cross Rate

Subscribe

This endpoint returns the price of any asset quoted in a Fiat currency within Open Exchange Rates. The USD price is calculated based on the path of the highest liquidity, with an additional step using forex rates to get the final fiat price. This means that, even though an asset might trade directly against all Open Exchange Rates currencies, the price might still be established by using cross-rates1. In cases where the most liquid path changed over time, this will be taken into account in the calculation of the price for each interval.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_spot_exchange_rate_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"code":"string","aggregate":"string","sources":true}'

POST /api/stream/aggregates_spot_exchange_rate_v1

Body parameter

{
"code": "string",
"aggregate": "string",
"sources": true
}

Parameters

Name In Type Required Description
body body kaikosdkStreamAggregatesSpotExchangeRateRequestV1 true none

Example responses

200 Response

{
"result": {
"aggregate": "string",
"code": "string",
"price": "string",
"sequenceId": "string",
"sources": {
"property1": {
"data": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"price": "string"
},
"property2": {
"data": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"price": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"uid": "string"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamAggregatesSpotExchangeRateResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamAggregatesSpotExchangeRateResponseV1 false none none

Direct Exchange Rate

Subscribe

This endpoint generates an aggregated price for an asset pair across all exchanges with spot markets for the pair. Only asset combinations which are actively being traded on one of our covered exchanges are being taken into account for the calculation of the price. Unsupported asset combinations will return no data. To return data used as input for the calculation of the aggregated price, set the sources parameter to true. Setting the sources parameter to false (default) will yield a faster response time. By making use of the sort parameter, data can be returned in ascending asc or descending desc order (default).

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_direct_exchange_rate_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"code":"string","aggregate":"string","sources":true}'

POST /api/stream/aggregates_direct_exchange_rate_v1

Body parameter

{
"code": "string",
"aggregate": "string",
"sources": true
}

Parameters

Name In Type Required Description
body body kaikosdkStreamAggregatesDirectExchangeRateRequestV1 true none

Example responses

200 Response

{
"result": {
"aggregate": "string",
"code": "string",
"price": "string",
"sequenceId": "string",
"sources": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"timestamp": "2019-08-24T14:15:22Z",
"uid": "string"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamAggregatesDirectExchangeRateResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamAggregatesDirectExchangeRateResponseV1 false none none

Trades

Subscribe

Retrieve an ongoing stream of tick-by-tick trades for any selection of instruments or exchanges.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/trades_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentCriteria":{"exchange":"string","instrumentClass":"string","code":"string"}}'

POST /api/stream/trades_v1

Body parameter

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
}
}

Parameters

Name In Type Required Description
body body kaikosdkStreamTradesRequestV1 true none

Example responses

200 Response

{
"result": {
"additionalProperties": {
"property1": "string",
"property2": "string"
},
"amount": 0,
"class": "string",
"code": "string",
"exchange": "string",
"sequenceId": "string",
"id": "string",
"price": 0,
"side": "UNKNOWN",
"tsExchange": {
"value": "2019-08-24T14:15:22Z"
},
"tsCollection": {
"value": "2019-08-24T14:15:22Z"
},
"tsEvent": "2019-08-24T14:15:22Z"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamTradesResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamTradesResponseV1 false none none

Enumerated Values

Property Value
side UNKNOWN
side BUY
side SELL

VWAP

Subscribe

Retrieve ongoing Volume Weighted Average Price updates. Supported intervals are 1s, 1m and 1h.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_vwap_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentCriteria":{"exchange":"string","instrumentClass":"string","code":"string"},"aggregate":"string"}'

POST /api/stream/aggregates_vwap_v1

Body parameter

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
},
"aggregate": "string"
}

Parameters

Name In Type Required Description
body body kaikosdkStreamAggregatesVWAPRequestV1 true none

Example responses

200 Response

{
"result": {
"aggregate": "string",
"class": "string",
"code": "string",
"exchange": "string",
"sequenceId": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z",
"uid": "string"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamAggregatesVWAPResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamAggregatesVWAPResponseV1 false none none

Derivatives

Subscribe

Real time derivatives data.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/derivatives_price_v2 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentCriteria":{"exchange":"string","instrumentClass":"string","code":"string"}}'

POST /api/stream/derivatives_price_v2

Body parameter

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
}
}

Parameters

Name In Type Required Description
body body kaikosdkStreamDerivativesPriceRequestV2 true none

Example responses

200 Response

{
"result": {
"class": "string",
"code": "string",
"exchange": "string",
"values": {
"property1": "string",
"property2": "string"
},
"tsExchange": {
"value": "2019-08-24T14:15:22Z"
},
"tsCollection": {
"value": "2019-08-24T14:15:22Z"
},
"tsEvent": "2019-08-24T14:15:22Z"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamDerivativesPriceResponseV2

Name Type Required Restrictions Description
» result kaikosdkStreamDerivativesPriceResponseV2 false none none

Indices

Subscribe

This endpoint provides custom indices.

Fields description

An indice consists in a unique indexCode and an optional commodities.

Finally, the reference value for the index is the price field in each percentile.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/index_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"indexCode":"string","commodities":["SIC_UNKNOWN"]}'

POST /api/stream/index_v1

Body parameter

{
"indexCode": "string",
"commodities": [
"SIC_UNKNOWN"
]
}

Parameters

Name In Type Required Description
body body kaikosdkStreamIndexServiceRequestV1 true none

Example responses

200 Response

{
"result": {
"indexCode": "string",
"commodity": "SIC_UNKNOWN",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"quote": "string",
"bases": [
{
"asset": "string",
"weight": 0
}
],
"exchanges": [
"string"
],
"percentages": [
{
"percentage": 0,
"price": 0,
"pairs": [
{
"pair": "string",
"weight": 0,
"instruments": [
{
"exchange": "string",
"price": 0,
"volume": 0
}
]
}
]
}
],
"tsEvent": "2019-08-24T14:15:22Z"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamIndexServiceResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamIndexServiceResponseV1 false none none

Enumerated Values

Property Value
commodity SIC_UNKNOWN
commodity SIC_REAL_TIME
commodity SIC_DAILY_FIXING

Market Update (Trades, Order Books, Best Bids and Asks)

Subscribe

Retrieve an ongoing stream of tick-by-tick trades, tick-level order book updates and top of book data.

Data can also be replayed by filling an interval (start time, end time), up to 5 weeks of history.

Code samples

curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/market_update_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentCriteria":{"exchange":"string","instrumentClass":"string","code":"string"},"commodities":["SMUC_UNKNOWN"],"interval":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"},"snapshotType":"UNKNOWN"}'

POST /api/stream/market_update_v1

Body parameter

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
},
"commodities": [
"SMUC_UNKNOWN"
],
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"snapshotType": "UNKNOWN"
}

Parameters

Name In Type Required Description
body body kaikosdkStreamMarketUpdateRequestV1 true none

Example responses

200 Response

{
"result": {
"commodity": "SMUC_UNKNOWN",
"amount": 0,
"class": "string",
"code": "string",
"exchange": "string",
"sequenceId": "string",
"id": "string",
"price": 0,
"tsExchange": {
"value": "2019-08-24T14:15:22Z"
},
"tsCollection": {
"value": "2019-08-24T14:15:22Z"
},
"tsEvent": "2019-08-24T14:15:22Z",
"updateType": "UNKNOWN",
"snapshot": {
"asks": [
{
"amount": 0,
"price": 0
}
],
"bids": [
{
"amount": 0,
"price": 0
}
]
}
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}
}

Responses

Status Meaning Description Schema
200 OK A successful response.(streaming responses) Inline
403 Forbidden Returned when the user does not have permission to access the resource. Inline
404 Not Found Returned when the resource does not exist. string
default Default An unexpected error response. rpcStatus

Response Schema

Status Code 200

Stream result of kaikosdkStreamMarketUpdateResponseV1

Name Type Required Restrictions Description
» result kaikosdkStreamMarketUpdateResponseV1 false none none

Enumerated Values

Property Value
commodity SMUC_UNKNOWN
commodity SMUC_TRADE
commodity SMUC_TOP_OF_BOOK
commodity SMUC_FULL_ORDER_BOOK
updateType UNKNOWN
updateType TRADE_BUY
updateType TRADE_SELL
updateType BEST_ASK
updateType BEST_BID
updateType UPDATED_ASK
updateType UPDATED_BID
updateType SNAPSHOT

Schemas

SnapshotOrder

{
"amount": 0,
"price": 0
}

Order is a amount at a price level.

Properties

Name Type Required Restrictions Description
amount number(double) false none Amount / quantity of asset bought or sold, displayed in base currency.
price number(double) false none Price for quote currency.

StreamMarketUpdateRequestV1OrderbookSnapshotType

"UNKNOWN"

OrderbookSnapshotType

Properties

Name Type Required Restrictions Description
OrderbookSnapshotType string false none - UNKNOWN: UNKNOWN means no snapshot is sent.
- TEN_PERCENT: TEN_PERCENT is ob10%.
- FULL: FULL is full orderbook.

Enumerated Values

Property Value
OrderbookSnapshotType UNKNOWN
OrderbookSnapshotType TEN_PERCENT
OrderbookSnapshotType FULL

StreamMarketUpdateResponseV1Snapshot

{
"asks": [
{
"amount": 0,
"price": 0
}
],
"bids": [
{
"amount": 0,
"price": 0
}
]
}

Snapshot is an orderbook snapshot.

Properties

Name Type Required Restrictions Description
asks [SnapshotOrder] false none Asks is the list of asks of the orderbook.
bids [SnapshotOrder] false none Bids is the list of bids of the orderbook.

StreamMarketUpdateResponseV1StreamMarketUpdateType

"UNKNOWN"

StreamMarketUpdateType is event category for a market update.

Properties

Name Type Required Restrictions Description
anonymous string false none StreamMarketUpdateType is event category for a market update.

- UNKNOWN: Unknown type.
- TRADE_BUY: TRADE_BUY type.
- TRADE_SELL: TRADE_SELL type.
- BEST_ASK: BEST_ASK type.
- BEST_BID: BEST_BID type.
- UPDATED_ASK: UPDATED_ASK type.
- UPDATED_BID: UPDATED_BID type.
- SNAPSHOT: SNAPSHOT type.

Enumerated Values

Property Value
anonymous UNKNOWN
anonymous TRADE_BUY
anonymous TRADE_SELL
anonymous BEST_ASK
anonymous BEST_BID
anonymous UPDATED_ASK
anonymous UPDATED_BID
anonymous SNAPSHOT

StreamTradesResponseV1TradeSide

"UNKNOWN"

Side

Properties

Name Type Required Restrictions Description
Side string false none - UNKNOWN: Unknown side (not specified).
- BUY: Buy side.
- SELL: Sell side.

Enumerated Values

Property Value
Side UNKNOWN
Side BUY
Side SELL

UnaryReferenceDataRequestV1ReferenceType

"UNKNOWN"

Reference Data types enum

Properties

Name Type Required Restrictions Description
Reference Data types enum string false none - UNKNOWN: UNKNOWN
- ASSETS: Assets reference
- EXCHANGES: Exchanges reference
- INSTRUMENTS: Instruments reference

Enumerated Values

Property Value
Reference Data types enum UNKNOWN
Reference Data types enum ASSETS
Reference Data types enum EXCHANGES
Reference Data types enum INSTRUMENTS

kaikosdkDataInterval

{
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}

DataInterval

Properties

Name Type Required Restrictions Description
startTime string(date-time) false none Starting time (inclusive, ISO 8601 for REST).
endTime string(date-time) false none Ending time (exclusive, ISO 8601 for REST).

kaikosdkEnvelope

{
"access": {},
"message": "string",
"query": {},
"status": "UNKNOWN",
"time": "2019-08-24T14:15:22Z",
"timestamp": "string"
}

Enveloppe in each API response

Properties

Name Type Required Restrictions Description
access object false none Time ranges of accesses ({}).
message string false none Error message, if query was not successful.
query object false none All handled query parameters echoed back.
status kaikosdkEnvelopeStatus false none - UNKNOWN: UNKNOWN result.
- ERROR: Error result.
- SUCCESS: Successful result.
time string(date-time) false none The current time at our endpoint.
timestamp string false none The current time at our endpoint.

kaikosdkEnvelopeStatus

"UNKNOWN"

EnvelopeStatus Status code of an API call

Properties

Name Type Required Restrictions Description
EnvelopeStatus
Status code of an API call string false none - UNKNOWN: UNKNOWN result.
- ERROR: Error result.
- SUCCESS: Successful result.

Enumerated Values

Property Value
EnvelopeStatus
Status code of an API call UNKNOWN
EnvelopeStatus
Status code of an API call ERROR
EnvelopeStatus
Status code of an API call SUCCESS

kaikosdkInstrumentCriteria

{
"exchange": "string",
"instrumentClass": "string",
"code": "string"
}

InstrumentCriteria

Properties

Name Type Required Restrictions Description
exchange string false none Instrument exchange code, for example “cbse” (Coinbase).
instrumentClass string false none Instrument class. See https://docs.kaiko.com/?python#instruments.
code string false none Instrument code. See https://docs.kaiko.com/?python#instruments.

kaikosdkReferenceDataResponseAsset

{
"assetClass": "string",
"assetClasses": [
"string"
],
"code": "string",
"name": "string"
}

ReferenceDataResponseAsset

Properties

Name Type Required Restrictions Description
assetClass string false none none
assetClasses [string] false none none
code string false none none
name string false none none

kaikosdkReferenceDataResponseExchange

{
"code": "string",
"kaikoLegacySlug": "string",
"name": "string"
}

ReferenceDataResponseExchange

Properties

Name Type Required Restrictions Description
code string false none none
kaikoLegacySlug string false none none
name string false none none

kaikosdkReferenceDataResponseInstrument

{
"kaikoLegacyExchangeSlug": "string",
"tradeStartTime": {},
"tradeEndTime": {},
"code": "string",
"exchangeCode": "string",
"exchangePairCode": "string",
"baseAsset": "string",
"quoteAsset": "string",
"kaikoLegacySymbol": "string",
"class": "string",
"tradeStartTimestamp": {},
"tradeEndTimestamp": {},
"tradeCount": "string",
"tradeCompressedSize": "string"
}

ReferenceDataResponseInstrument google.protobuf.Value are used for nullable types that potentially return unwanted default values

Properties

Name Type Required Restrictions Description
kaikoLegacyExchangeSlug string false none none
tradeStartTime object false none none
tradeEndTime object false none none
code string false none none
exchangeCode string false none none
exchangePairCode string false none none
baseAsset string false none none
quoteAsset string false none none
kaikoLegacySymbol string false none none
class string false none none
tradeStartTimestamp object false none none
tradeEndTimestamp object false none none
tradeCount string(uint64) false none none
tradeCompressedSize string(uint64) false none none

kaikosdkReferenceDataResponseListAsset

{
"values": [
{
"assetClass": "string",
"assetClasses": [
"string"
],
"code": "string",
"name": "string"
}
]
}

ReferenceDataResponseListAsset is a list of ReferenceDataResponseAsset

Properties

Name Type Required Restrictions Description
values [kaikosdkReferenceDataResponseAsset] false none none

kaikosdkReferenceDataResponseListExchange

{
"values": [
{
"code": "string",
"kaikoLegacySlug": "string",
"name": "string"
}
]
}

ReferenceDataResponseListExchange is a list of ReferenceDataResponseExchange

Properties

Name Type Required Restrictions Description
values [kaikosdkReferenceDataResponseExchange] false none none

kaikosdkReferenceDataResponseListInstrument

{
"values": [
{
"kaikoLegacyExchangeSlug": "string",
"tradeStartTime": {},
"tradeEndTime": {},
"code": "string",
"exchangeCode": "string",
"exchangePairCode": "string",
"baseAsset": "string",
"quoteAsset": "string",
"kaikoLegacySymbol": "string",
"class": "string",
"tradeStartTimestamp": {},
"tradeEndTimestamp": {},
"tradeCount": "string",
"tradeCompressedSize": "string"
}
]
}

ReferenceDataResponseListInstrument is a list of ReferenceDataResponseInstrument

Properties

Name Type Required Restrictions Description
values [kaikosdkReferenceDataResponseInstrument] false none none

kaikosdkSortCriteria

"SORT_UNKNOWN"

SortCriteria

Properties

Name Type Required Restrictions Description
SortCriteria string false none - SORT_UNKNOWN: SORT_UNKNOWN (sorting not specified).
- ASC: ASC (ascendant).
- DESC: DESC (descendant).

Enumerated Values

Property Value
SortCriteria SORT_UNKNOWN
SortCriteria ASC
SortCriteria DESC

kaikosdkSource

{
"data": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"price": "string"
}

Source

Properties

Name Type Required Restrictions Description
data [kaikosdkSourceData] false none Prices for instrument code in each exchange.
price string false none Price for related instrument code accross exchanges.

kaikosdkSourceData

{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}

SourceData

Properties

Name Type Required Restrictions Description
exchangeCode string false none Instrument exchange code, for example “cbse” (Coinbase).
count string(int64) false none Number of trades for the given instrument code and aggregate.
price string false none Price for the instrument code on the exchange and interval.
volume string false none Volume for the instrument code on the exchange and interval.

kaikosdkStreamAggregatesDirectExchangeRateRequestV1

{
"code": "string",
"aggregate": "string",
"sources": true
}

StreamAggregatesDirectExchangeRateRequestV1

Properties

Name Type Required Restrictions Description
code string false none Instrument code.
aggregate string false none Aggregate value (1s, 1m, 1h).
sources boolean false none Flag to include sources in the stream (if permissions match). Sources are all the prices which were used to calculate aggregated price.

kaikosdkStreamAggregatesDirectExchangeRateResponseV1

{
"aggregate": "string",
"code": "string",
"price": "string",
"sequenceId": "string",
"sources": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"timestamp": "2019-08-24T14:15:22Z",
"uid": "string"
}

StreamAggregatesDirectExchangeRateResponseV1

Properties

Name Type Required Restrictions Description
aggregate string false none Aggregate (interval).
code string false none Instrument code.
price string false none Price for the trade.
sequenceId string false none Sequence ID for event. Sortable in lexicographic order.
sources [kaikosdkSourceData] false none Sources of calculus (if requested), each key is an instrument segment for the root instrument code.
timestamp string(date-time) false none Timestamp of event.
uid string false none UID is timestamp truncated to interval of OHLCV.

kaikosdkStreamAggregatesOHLCVRequestV1

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
},
"aggregate": "string"
}

StreamAggregatesOHLCVRequestV1

Properties

Name Type Required Restrictions Description
instrumentCriteria kaikosdkInstrumentCriteria false none none
aggregate string false none Aggregate value (1s, 1m, 1h).

kaikosdkStreamAggregatesOHLCVResponseV1

{
"aggregate": "string",
"class": "string",
"close": "string",
"exchange": "string",
"high": "string",
"low": "string",
"open": "string",
"sequenceId": "string",
"code": "string",
"timestamp": "2019-08-24T14:15:22Z",
"uid": "string",
"volume": "string"
}

StreamAggregatesOHLCVResponseV1

Properties

Name Type Required Restrictions Description
aggregate string false none Aggregate (interval).
class string false none Instrument class.
close string false none Close value of OHLCV.
exchange string false none Instrument exchange.
high string false none High value of OHLCV.
low string false none Low value of OHLCV.
open string false none Open value of OHLCV.
sequenceId string false none Sequence ID for event. Sortable in lexicographic order.
code string false none Instrument code.
timestamp string(date-time) false none Timestamp of event.
uid string false none UID is timestamp truncated to interval of OHLCV.
volume string false none Volume of OHLCV.

kaikosdkStreamAggregatesSpotExchangeRateRequestV1

{
"code": "string",
"aggregate": "string",
"sources": true
}

StreamAggregatesSpotExchangeRateRequestV1

Properties

Name Type Required Restrictions Description
code string false none Instrument code.
aggregate string false none Aggregate value (1s, 1m, 1h).
sources boolean false none Flag to include sources in the stream (if permissions match). Sources are all the prices which were used to calculate aggregated price.

kaikosdkStreamAggregatesSpotExchangeRateResponseV1

{
"aggregate": "string",
"code": "string",
"price": "string",
"sequenceId": "string",
"sources": {
"property1": {
"data": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"price": "string"
},
"property2": {
"data": [
{
"exchangeCode": "string",
"count": "string",
"price": "string",
"volume": "string"
}
],
"price": "string"
}
},
"timestamp": "2019-08-24T14:15:22Z",
"uid": "string"
}

StreamAggregatesSpotExchangeRateResponseV1

Properties

Name Type Required Restrictions Description
aggregate string false none Aggregate (interval).
code string false none Instrument code (for example btc-usd).
price string false none Aggregated price for the instrument code accross exchanges.
sequenceId string false none Sequence ID for event. Sortable in lexicographic order.
sources object false none Sources of calculus (if requested), each key is an instrument segment for the root instrument code.
» additionalProperties kaikosdkSource false none none
timestamp string(date-time) false none Timestamp of event.
uid string false none UID is timestamp truncated to interval of OHLCV.

kaikosdkStreamAggregatesVWAPRequestV1

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
},
"aggregate": "string"
}

StreamAggregatesVWAPRequestV1

Properties

Name Type Required Restrictions Description
instrumentCriteria kaikosdkInstrumentCriteria false none none
aggregate string false none Aggregate value (1s, 1m, 1h).

kaikosdkStreamAggregatesVWAPResponseV1

{
"aggregate": "string",
"class": "string",
"code": "string",
"exchange": "string",
"sequenceId": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z",
"uid": "string"
}

StreamAggregatesVWAPResponseV1

Properties

Name Type Required Restrictions Description
aggregate string false none Aggregate (interval).
class string false none Instrument class, empty when instrument not mapped.
code string false none Instrument code, empty when instrument not mapped.
exchange string false none Instrument exchange.
sequenceId string false none Sequence ID for event. Sortable in lexicographic order.
price number(double) false none Price for the trade.
tsEvent string(date-time) false none Event generation timestamp (event created by Kaiko), after normalization.
uid string false none UID is timestamp truncated to interval of OHLCV.

kaikosdkStreamDerivativesPriceRequestV2

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
}
}

StreamDerivativesPriceRequestV2

Properties

Name Type Required Restrictions Description
instrumentCriteria kaikosdkInstrumentCriteria false none none

kaikosdkStreamDerivativesPriceResponseV2

{
"class": "string",
"code": "string",
"exchange": "string",
"values": {
"property1": "string",
"property2": "string"
},
"tsExchange": {
"value": "2019-08-24T14:15:22Z"
},
"tsCollection": {
"value": "2019-08-24T14:15:22Z"
},
"tsEvent": "2019-08-24T14:15:22Z"
}

StreamDerivativesPriceResponseV2

Properties

Name Type Required Restrictions Description
class string false none Instrument class, empty when instrument not mapped.
code string false none Instrument code, empty when instrument not mapped.
exchange string false none Instrument exchange.
values object false none Derivatives Values, specific to the exchange.
» additionalProperties string false none none
tsExchange kaikosdkTimestampValue false none TimestampValue wraps optional timestamp.
tsCollection kaikosdkTimestampValue false none TimestampValue wraps optional timestamp.
tsEvent string(date-time) false none Event generation timestamp (event created by Kaiko), after normalization.

kaikosdkStreamIndexCommodity

"SIC_UNKNOWN"

StreamIndexCommodity allows selecting kind of index update wanted.

Properties

Name Type Required Restrictions Description
anonymous string false none StreamIndexCommodity allows selecting kind of index update wanted.

- SIC_UNKNOWN: Unknown commodity.
- SIC_REAL_TIME: REAL_TIME commodity.
- SIC_DAILY_FIXING: DAILY_FIXING commodity.

Enumerated Values

Property Value
anonymous SIC_UNKNOWN
anonymous SIC_REAL_TIME
anonymous SIC_DAILY_FIXING

kaikosdkStreamIndexServiceRequestV1

{
"indexCode": "string",
"commodities": [
"SIC_UNKNOWN"
]
}

StreamIndexServiceRequestV1

Properties

Name Type Required Restrictions Description
indexCode string false none Index code.
commodities [kaikosdkStreamIndexCommodity] false none Enum indicating type of feed.

kaikosdkStreamIndexServiceResponseBaseAsset

{
"asset": "string",
"weight": 0
}

StreamIndexServiceResponseBaseAsset is base asset involved in computation.

Properties

Name Type Required Restrictions Description
asset string false none Asset.
weight number(double) false none Weight.

kaikosdkStreamIndexServiceResponseInstruments

{
"exchange": "string",
"price": 0,
"volume": 0
}

StreamIndexServiceResponseInstruments is computation result by instruments.

Properties

Name Type Required Restrictions Description
exchange string false none Exchange.
price number(double) false none Price.
volume number(double) false none Volume.

kaikosdkStreamIndexServiceResponsePairs

{
"pair": "string",
"weight": 0,
"instruments": [
{
"exchange": "string",
"price": 0,
"volume": 0
}
]
}

StreamIndexServiceResponsePairs is computation result by pairs.

Properties

Name Type Required Restrictions Description
pair string false none Pair.
weight number(double) false none Weight (for multiple assets indices).
instruments [kaikosdkStreamIndexServiceResponseInstruments] false none Detailed computation by instruments.

kaikosdkStreamIndexServiceResponsePercentage

{
"percentage": 0,
"price": 0,
"pairs": [
{
"pair": "string",
"weight": 0,
"instruments": [
{
"exchange": "string",
"price": 0,
"volume": 0
}
]
}
]
}

StreamIndexServiceResponsePercentage is computation result by percentage.

Properties

Name Type Required Restrictions Description
percentage number(double) false none Percentage.
price number(double) false none Price computed for the whole percentage.
pairs [kaikosdkStreamIndexServiceResponsePairs] false none Detailed computation by pairs.

kaikosdkStreamIndexServiceResponseV1

{
"indexCode": "string",
"commodity": "SIC_UNKNOWN",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"quote": "string",
"bases": [
{
"asset": "string",
"weight": 0
}
],
"exchanges": [
"string"
],
"percentages": [
{
"percentage": 0,
"price": 0,
"pairs": [
{
"pair": "string",
"weight": 0,
"instruments": [
{
"exchange": "string",
"price": 0,
"volume": 0
}
]
}
]
}
],
"tsEvent": "2019-08-24T14:15:22Z"
}

StreamIndexServiceResponseV1

Properties

Name Type Required Restrictions Description
indexCode string false none Index code.
commodity kaikosdkStreamIndexCommodity false none StreamIndexCommodity allows selecting kind of index update wanted.

- SIC_UNKNOWN: Unknown commodity.
- SIC_REAL_TIME: REAL_TIME commodity.
- SIC_DAILY_FIXING: DAILY_FIXING commodity.
interval kaikosdkDataInterval false none none
quote string false none Quote.
bases [kaikosdkStreamIndexServiceResponseBaseAsset] false none Bases.
exchanges [string] false none Exchanges.
percentages [kaikosdkStreamIndexServiceResponsePercentage] false none Detailed computation by percentage.
tsEvent string(date-time) false none Event generation timestamp (event created by Kaiko), after normalization.

kaikosdkStreamMarketUpdateCommodity

"SMUC_UNKNOWN"

StreamMarketUpdateCommodity allows selecting kind of market update wanted.

Properties

Name Type Required Restrictions Description
anonymous string false none StreamMarketUpdateCommodity allows selecting kind of market update wanted.

- SMUC_UNKNOWN: Unknown commodity.
- SMUC_TRADE: TRADE commodity.
- SMUC_TOP_OF_BOOK: TOP_OF_BOOK commodity.
- SMUC_FULL_ORDER_BOOK: FULL_ORDER_BOOK commodity.

Enumerated Values

Property Value
anonymous SMUC_UNKNOWN
anonymous SMUC_TRADE
anonymous SMUC_TOP_OF_BOOK
anonymous SMUC_FULL_ORDER_BOOK

kaikosdkStreamMarketUpdateRequestV1

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
},
"commodities": [
"SMUC_UNKNOWN"
],
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"snapshotType": "UNKNOWN"
}

StreamMarketUpdateRequestV1

Properties

Name Type Required Restrictions Description
instrumentCriteria kaikosdkInstrumentCriteria false none none
commodities [kaikosdkStreamMarketUpdateCommodity] false none Enum indicating type of feed.
interval kaikosdkDataInterval false none none
snapshotType StreamMarketUpdateRequestV1OrderbookSnapshotType false none - UNKNOWN: UNKNOWN means no snapshot is sent.
- TEN_PERCENT: TEN_PERCENT is ob10%.
- FULL: FULL is full orderbook.

kaikosdkStreamMarketUpdateResponseV1

{
"commodity": "SMUC_UNKNOWN",
"amount": 0,
"class": "string",
"code": "string",
"exchange": "string",
"sequenceId": "string",
"id": "string",
"price": 0,
"tsExchange": {
"value": "2019-08-24T14:15:22Z"
},
"tsCollection": {
"value": "2019-08-24T14:15:22Z"
},
"tsEvent": "2019-08-24T14:15:22Z",
"updateType": "UNKNOWN",
"snapshot": {
"asks": [
{
"amount": 0,
"price": 0
}
],
"bids": [
{
"amount": 0,
"price": 0
}
]
}
}

StreamMarketUpdateResponseV1

Properties

Name Type Required Restrictions Description
commodity kaikosdkStreamMarketUpdateCommodity false none StreamMarketUpdateCommodity allows selecting kind of market update wanted.

- SMUC_UNKNOWN: Unknown commodity.
- SMUC_TRADE: TRADE commodity.
- SMUC_TOP_OF_BOOK: TOP_OF_BOOK commodity.
- SMUC_FULL_ORDER_BOOK: FULL_ORDER_BOOK commodity.
amount number(double) false none Amount / quantity of asset bought or sold, displayed in base currency.
class string false none Instrument class, internal Kaiko classification denoting whether an instrument is a spot, future, perpetual future, or option.
code string false none Instrument code (currency pair), for example btc-usd.
exchange string false none Instrument exchange code, for example “cbse” (Coinbase).
sequenceId string false none Sequence ID for event. Sortable in lexicographic order.
id string false none ID from exchange (trades only), empty string when not present.
price number(double) false none Price for quote currency.
tsExchange kaikosdkTimestampValue false none TimestampValue wraps optional timestamp.
tsCollection kaikosdkTimestampValue false none TimestampValue wraps optional timestamp.
tsEvent string(date-time) false none Event generation timestamp (event created by Kaiko), after normalization.
updateType StreamMarketUpdateResponseV1StreamMarketUpdateType false none StreamMarketUpdateType is event category for a market update.

- UNKNOWN: Unknown type.
- TRADE_BUY: TRADE_BUY type.
- TRADE_SELL: TRADE_SELL type.
- BEST_ASK: BEST_ASK type.
- BEST_BID: BEST_BID type.
- UPDATED_ASK: UPDATED_ASK type.
- UPDATED_BID: UPDATED_BID type.
- SNAPSHOT: SNAPSHOT type.
snapshot StreamMarketUpdateResponseV1Snapshot false none Snapshot is an orderbook snapshot.

kaikosdkStreamTradesRequestV1

{
"instrumentCriteria": {
"exchange": "string",
"instrumentClass": "string",
"code": "string"
}
}

StreamTradesRequestV1

Properties

Name Type Required Restrictions Description
instrumentCriteria kaikosdkInstrumentCriteria false none none

kaikosdkStreamTradesResponseV1

{
"additionalProperties": {
"property1": "string",
"property2": "string"
},
"amount": 0,
"class": "string",
"code": "string",
"exchange": "string",
"sequenceId": "string",
"id": "string",
"price": 0,
"side": "UNKNOWN",
"tsExchange": {
"value": "2019-08-24T14:15:22Z"
},
"tsCollection": {
"value": "2019-08-24T14:15:22Z"
},
"tsEvent": "2019-08-24T14:15:22Z"
}

StreamTradesResponseV1

Properties

Name Type Required Restrictions Description
additionalProperties object false none Additionnal properties, specific to the exchange.
» additionalProperties string false none none
amount number(double) false none Amount / quantity of asset bought or sold, displayed in base currency.
class string false none Instrument class, empty when instrument not mapped.
code string false none Instrument code, empty when instrument not mapped.
exchange string false none Instrument exchange code, for example “cbse” (Coinbase).
sequenceId string false none Sequence ID for event. Sortable in lexicographic order.
id string false none Trade ID, empty string when not present.
price number(double) false none Price for the trade.
side StreamTradesResponseV1TradeSide false none - UNKNOWN: Unknown side (not specified).
- BUY: Buy side.
- SELL: Sell side.
tsExchange kaikosdkTimestampValue false none TimestampValue wraps optional timestamp.
tsCollection kaikosdkTimestampValue false none TimestampValue wraps optional timestamp.
tsEvent string(date-time) false none Event generation timestamp (event created by Kaiko), after normalization.

kaikosdkTimestampValue

{
"value": "2019-08-24T14:15:22Z"
}

TimestampValue wraps optional timestamp.

Properties

Name Type Required Restrictions Description
value string(date-time) false none The timestamp value.

kaikosdkUnaryReferenceDataResponseV1

{
"envelope": {
"access": {},
"message": "string",
"query": {},
"status": "UNKNOWN",
"time": "2019-08-24T14:15:22Z",
"timestamp": "string"
},
"assets": {
"values": [
{
"assetClass": "string",
"assetClasses": [
"string"
],
"code": "string",
"name": "string"
}
]
},
"exchanges": {
"values": [
{
"code": "string",
"kaikoLegacySlug": "string",
"name": "string"
}
]
},
"instruments": {
"values": [
{
"kaikoLegacyExchangeSlug": "string",
"tradeStartTime": {},
"tradeEndTime": {},
"code": "string",
"exchangeCode": "string",
"exchangePairCode": "string",
"baseAsset": "string",
"quoteAsset": "string",
"kaikoLegacySymbol": "string",
"class": "string",
"tradeStartTimestamp": {},
"tradeEndTimestamp": {},
"tradeCount": "string",
"tradeCompressedSize": "string"
}
]
}
}

UnaryReferenceDataResponseV1

Properties

Name Type Required Restrictions Description
envelope kaikosdkEnvelope false none none
assets kaikosdkReferenceDataResponseListAsset false none none
exchanges kaikosdkReferenceDataResponseListExchange false none none
instruments kaikosdkReferenceDataResponseListInstrument false none none

kaikosdkUnaryTradesHistoricalResponseItemV1

{
"timestamp": "2019-08-24T14:15:22Z",
"tradeId": "string",
"price": 0,
"amount": 0,
"takerSideSell": {}
}

UnaryTradesHistoricalResponseItemV1

Properties

Name Type Required Restrictions Description
timestamp string(date-time) false none none
tradeId string false none none
price number(double) false none none
amount number(double) false none none
takerSideSell object false none none

kaikosdkUnaryTradesHistoricalResponseV1

{
"envelope": {
"access": {},
"message": "string",
"query": {},
"status": "UNKNOWN",
"time": "2019-08-24T14:15:22Z",
"timestamp": "string"
},
"values": [
{
"timestamp": "2019-08-24T14:15:22Z",
"tradeId": "string",
"price": 0,
"amount": 0,
"takerSideSell": {}
}
]
}

UnaryTradesHistoricalResponseV1

Properties

Name Type Required Restrictions Description
envelope kaikosdkEnvelope false none none
values [kaikosdkUnaryTradesHistoricalResponseItemV1] false none none

protobufAny

{
"typeUrl": "string",
"value": "string"
}

Properties

Name Type Required Restrictions Description
typeUrl string false none none
value string(byte) false none none

protobufNullValue

"NULL_VALUE"

NullValue is a singleton enumeration to represent the null value for the Value type union.

The JSON representation for NullValue is JSON null.

Properties

Name Type Required Restrictions Description
anonymous string false none NullValue is a singleton enumeration to represent the null value for the
Value type union.

The JSON representation for NullValue is JSON null.

- NULL_VALUE: Null value.

Enumerated Values

Property Value
anonymous NULL_VALUE

rpcStatus

{
"code": 0,
"message": "string",
"details": [
{
"typeUrl": "string",
"value": "string"
}
]
}

Properties

Name Type Required Restrictions Description
code integer(int32) false none none
message string false none none
details [protobufAny] false none none