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++, C#, Go, Java, Node, Python, Rust, Scala as well as the API references for each language can be found here
Base URLs:
-
https://gateway-v0-http.kaiko.ovh (Swagger playground)
-
https://gateway-v0-grpc.kaiko.ovh (gRPC Production)
ICE
To connect to our services through ICE instead of internet, you need to disable TLS and use the HTTP port 80.
Base URLS:
- http://stream-http.ice.kaiko.com (Swagger Playground)
- http://stream.ice.kaiko.com (gRPC Production)
Authentication
- API Key (ApiKeyAuth)
- Parameter Name: X-Api-Key, in: header.
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 forkrkn
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 forkrkn
exchange:krkn:spot:*
[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "btc-usd"
},
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "eth-usd"
}
]
All instruments for
krkn
that havebtc
as part of the instrument code:krkn:*:*btc*
[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "btc-usd"
}
]
Kaiko Instrument Globbing allows the use of the wildcard *
.
It can replace any parameter of the pattern:
<exchange>:<instrument_class>:*
<exchange>:*:<instrument>
*:<instrument_class>:<instrument>
It can also be used inside a parameter:
instrument
:btc-*
will match all instruments withbtc
as base asset.
Cartesian Product of Patterns
All
krkn
andokex
instruments that haveusd
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:
pattern1 = exchange1:instrument_class:instrument1
pattern2 = exchange1:instrument_class:instrument2
pattern3 = exchange2:instrument_class:instrument1
pattern4 = exchange2:instrument_class:instrument2
Union of Patterns
All
krkn
andcbse
instruments that havebtc
as part of the instrument code plus thekrkn:spot:eth-usd
instrument:krkn,cbse:*:*btc*+krkn:spot:eth-usd
[
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "btc-usd"
},
{
"exchange": "krkn", "instrument_class": "spot", "instrument": "eth-usd"
},
{
"exchange": "cbse", "instrument_class": "spot", "instrument ": "eth-btc"
}
]
Multiple patterns can also be combined with the +
operator:
pattern = pattern1+pattern2
where:
pattern1 = <exchange1>:<instrument_class1>:<instrument1>
pattern2 = <exchange2>:<instrument_class2>:<instrument2>
Aggregated Quote (v2)
Subscribe
Retrieve ongoing Top Of Book (Ask or Bid) average price updates accross a selection of vetted exchanges, for a given instrument.
Wildcard (*
) is not supported, but you can provide a comma separated list of instruments codes (for example: “btc-usd,eth-usd” as code
field).
An empty value can be returned when there are no changes on best ask or best bid across exchanges where the requested instrument is listed. This allows checking that the service is working as expected even though no meaningful update is sent.
The update frequency is 1s.
The default price you get is vetted
(meaning using only the exchanges that are part of Kaiko Exchange Ranking).
If your asset is not covered by this list, you can opt in includeUnvettedPrice
request parameter to true
to have a second price computed using all exchange covered by Kaiko, whose result will be under the field unvetted
of response.
Note that Kaiko Exchange Ranking list is changing from quarter to quarter, so if there an asset that is only covered by 1 exchange and this 1 exchange gets out of Exchange Ranking at some point, the only way to keep having a price is by setting includeUnvettedPrice
accordingly as a backup price.
Code samples
curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregated_quote_v2 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentClass":"string","code":"string","interval":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"},"includeUnvettedPrice":true}'
POST /api/stream/aggregated_quote_v2
Body parameter
{
"instrumentClass": "string",
"code": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"includeUnvettedPrice": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | kaikosdkStreamAggregatedQuoteRequestV2 | true | none |
Example responses
200 Response
{
"result": {
"aggregate": "string",
"instrumentClass": "string",
"code": "string",
"eventType": "UNKNOWN",
"tsEvent": "2019-08-24T14:15:22Z",
"vetted": {
"price": "string",
"volume": "string"
},
"unvetted": {
"price": "string",
"volume": "string"
}
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 kaikosdkStreamAggregatedQuoteResponseV2
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» result | kaikosdkStreamAggregatedQuoteResponseV2 | false | none | none |
Enumerated Values
Property | Value |
---|---|
eventType | UNKNOWN |
eventType | BEST_ASK |
eventType | BEST_BID |
Aggregated Quote (v1)
Subscribe
Retrieve ongoing Top Of Book (Ask or Bid) average price updates accross a selection of exchanges, for a given instrument.
Wildcard (*
) is not supported, but you can provide a comma separated list of instruments codes (for example: “btc-usd,eth-usd” as code
field).
An empty value can be returned when there are no changes on best ask or best bid across exchanges where the requested instrument is listed. This allows checking that the service is working as expected even though no meaningful update is sent.
The update frequency is 5s.
Code samples
curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregated_price_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"instrumentClass":"string","code":"string","interval":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"}}'
POST /api/stream/aggregated_price_v1
Body parameter
{
"instrumentClass": "string",
"code": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | kaikosdkStreamAggregatedPriceRequestV1 | true | none |
Example responses
200 Response
{
"result": {
"aggregate": "string",
"instrumentClass": "string",
"code": "string",
"value": {
"price": "string",
"volume": "string"
},
"eventType": "UNKNOWN",
"tsEvent": "2019-08-24T14:15:22Z"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 kaikosdkStreamAggregatedPriceResponseV1
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» result | kaikosdkStreamAggregatedPriceResponseV1 | false | none | none |
Enumerated Values
Property | Value |
---|---|
eventType | UNKNOWN |
eventType | BEST_ASK |
eventType | BEST_BID |
OHLCV (Candles)
Subscribe
Retrieve ongoing Open-High-Low-Close-Volume candle updates. Supported intervals are 1s, 1m and 1h.
Event Sending Rate
Please note that an event is not sent for every trades on the feed for a given exchange/instrument. Feed consumers should treat each event update as an absolute representation, indicating the precise values of data aggregation at the time it is sent. Each update represents an accurate aggregation at a specific point in time. This implies that there must be at least one tick between two consecutive events for a given exchange/symbol, though there may be more.
Duplicate Events
For OHLCV/VWAP, duplicate events may be sent due to the way data is aggregated in our centralized datastore. This means that for two consecutive events for a given exchange/code, the first event might contain an aggregated result that includes ticks inserted before we sent an update message. This can result in duplicates for the subsequent update since it has already been accounted for in the aggregation of the first event. It is important to note that this does not indicate inaccurate data, as we consistently provide accurate real-time information. Instead, it represents high trading volume being ingested rapidly, which is actually a positive aspect, as it keeps you up-to-date with the latest developments on the exchanges. In some instances, our updates may even be faster.
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": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 |
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": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 |
Digital Assets Rates
Subscribe
Kaiko Digital Rates are aggregated prices calculated over executed trades on Kaiko’s vetted centralized exchanges.
Kaiko Digital Rates cover a large spectrum of pairs. It is designed on a simplified vetting scheme combined with a robust aggregation methodology and pre-defined optimization parameters.
Exchanges composition are rebalanced on a quarterly basis.
Rates publications are available in real-time and at fixings.
More information can be found here.
Fields description
A Kaiko Digital Rate consists in a unique indexCode
.
indexCode
is the ticker identifying the rate.commodity
is the type of publication: real-time or fixings.interval
is the time period in which transaction data are considered for the calculation of the rate. If a rate has an interval of 15 seconds,startTime
andendTime
will be separated by 15s.quote
is the quote asset used for the rate denomination.bases
is the list of baseasset
included in the rate and theirweight
.exchanges
are the exchanges involved in the computation. This list can be adjusted every quarter during the rebalancing period and depending on the new results given by the liquidity and coverage optimization.percentages
are the different distribution levels included in the price computation.price
is the value of the rate in the quote denomination.pairs
is the list of pairs combined with additional details included in the computation.tsEvent
is the exact time of price publication.
Multiple subscriptions support
You can specify multiple rates at a time by filling indexCode
request field with either:
- wildcard (
*
) : means you get all rates associated with your API key - a comma separated list of rates (for example:
indexCode1,indexCode2,indexCode3
).
Please refer to the list of rates available on our website to access the indexCode associated with your subscription.
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"],"interval":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"}}'
POST /api/stream/index_v1
Body parameter
{
"indexCode": "string",
"commodities": [
"SIC_UNKNOWN"
],
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
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": [
{
"partition": "string",
"price": 0,
"volume": 0,
"count": "string"
}
]
}
]
}
],
"tsEvent": "2019-08-24T14:15:22Z"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 |
Blue-chip Indices
Subscribe
Kaiko Blue-chip Indices are replicable benchmarks calculated over baskets of digital assets based on sets of transparent business rules (available here).
It is designed on top of our Kaiko Digital Asset Rates and rebalanced on a quarterly basis.
Kaiko Blue-chip Indices publications are available in real-time and at fixings.
More information can be found here.
Fields description
A Kaiko Blue-chip Index consists in a unique indexCode
.
indexCode
is the ticker identifying the index.commodity
is the type of publication: real-time or fixings.interval
is the time period in which transaction data are considered for the calculation of the index. If an index has an interval of 15 seconds,startTime
andendTime
will be separated by 15s.mainQuote
is the quote asset used for the index denomination.compositions
is the list of underlying instrument used to compute the index price with tick details such asunderlyingInstrument
,exchanges
,instrumentInterval
andtsEvent
.price
providesindexValue
in the quote denomination as well as indexdivisor
from last quarterly review.pairs
is the list of underlying instrument with quarterly reviewed information such asweightingFactor
,cappingFactor
andcurrencyConversionFactor
.tsEvent
is the theoretical time of price publication.tsCompute
is the exact time of price computation.
Computation buffering
Computation buffering is defined as the buffer time applied at the index level computation. Buffer time aims to ensure that index level is computed with latest underlying rates prices available for a given tick period.
Because underlying rates are subject to centralized exchanges latencies, an underlying rate can likely be published after the theoretical time of publication (i.e. tsEvent
).
In that case, our index computation engine is waiting for a determinated time to trigger the calculation.
- 5 seconds for real-time
- 15 minutes for fixings
Multiple subscriptions support
You can specify multiple rates at a time by filling indexCode
request field with either:
- wildcard (
*
) : means you get all rates associated with your API key - a comma separated list of rates (for example:
indexCode1,indexCode2,indexCode3
).
Please refer to the list of indices available on our website to access the indexCode associated with your subscription.
Code samples
curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/index_multi_assets_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"indexCode":"string","commodities":["SIC_UNKNOWN"],"interval":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"}}'
POST /api/stream/index_multi_assets_v1
Body parameter
{
"indexCode": "string",
"commodities": [
"SIC_UNKNOWN"
],
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | kaikosdkStreamIndexMultiAssetsServiceRequestV1 | true | none |
Example responses
200 Response
{
"result": {
"commodity": "SIC_UNKNOWN",
"indexCode": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"mainQuote": "string",
"compositions": [
{
"underlyingInstrument": "string",
"base": "string",
"quote": "string",
"exchanges": [
"string"
],
"instrumentInterval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"currencyConversion": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
],
"price": {
"indexValue": 0,
"divisor": 0,
"pairs": [
{
"underlyingInstrument": "string",
"underlyingPrice": 0,
"weightingFactor": 0,
"cappingFactor": 0,
"currencyConversionFactor": 0
}
]
},
"tsEvent": "2019-08-24T14:15:22Z",
"tsCompute": "2019-08-24T14:15:22Z"
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 kaikosdkStreamIndexMultiAssetsServiceResponseV1
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» result | kaikosdkStreamIndexMultiAssetsServiceResponseV1 | 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 and end time being both mandatory), up to 72 hours of history.
By default, if you don’t specifiy a commodity
, you get all kinds of commodites (SMUC_FULL_ORDER_BOOK
, SMUC_TRADE
, SMUC_TOP_OF_BOOK
).
If you specifiy one or more commodites, you will get only the ones filled.
High traffic endpoint warning and slow consumer policy
Market update is a stream feed with a lot of data in terms of bandwidth. Due to the high traffic nature of this endpoint, late subscriptions can’t be kept alive indefinitely.
You should always be able to consume the data Kaiko is sending to your subscription in time, otherwise the subscription will be terminated automatically past a certain threshold.
Few common things to check for this assumption to be true:
- Your machine should have sufficient bandwidth
- No process should block the gRPC reading loop
- If using Python SDK particularily, you should make use gRPC Async IO or switch to another SDK language binding. This is due to some limitations in Python SDK.
- Check out gRPC performance official best practices guidelines
Ordering of data
Live data
- L2 updates (
SMUC_FULL_ORDER_BOOK
) data is ordered for a given exchange/instrument pair. This means that for 2 concurrent subscriptions, you won’t have the same order of received data globally, but, for example, for a paircbse:spot:btc-usd
you will have the same order across all subscriptions. - Trades and Top Of Book (
SMUC_TRADE
andSMUC_TOP_OF_BOOK
) is not ordered.
Replay data
- All data is ordered by timestamp for up to 72 hours of history.
Order Book data processing
-
When subscribing to
SMUC_FULL_ORDER_BOOK
, you will first receive a full snapshot (after few seconds) and then all subsequent L2 updates. If you ever receive again a full snapshot, it means you should replace your local snapshot with the one received. This should happen infrequently and occurs when we detect a consistency issue (connection to exchange lost, exchange down for some time, etc.) -
When amount is 0 for an update, the price level should be removed from the orderbook. It is normal that sometimes you receive a message to remove a price level which does not exist in the local orderbook. This is due to various exchange limitations (limited snapshot depth in the exchange API for example) and can be safely ignored. For example, as of Python’s protobuf 4.22.0, you can include “including_default_value_fields = True” in your serialization code to see message fields whose value are default values (for example “0” for integers). Please refer to the respective programming language’s webpage to learn how to activative this.
-
Orderbook should not be considered valid until all updates for the same
tsExchange
have been applied to your local orderbook (ie. potential messages of the same batch of update from the exchange have all been applied)
SequenceID field
Market update data is coming with a sequenceId
field. This allows ordering events by lexicographical order and can be seen as an alphabetical version of tsCollection
and tsEvent
.
This field is unique for all stream data, and can be used to deduplicate data in the event you need to use replay to recover missed data and check for events already present in your system.
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": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 | TRADE_UNKNOWN |
updateType | BEST_ASK |
updateType | BEST_BID |
updateType | UPDATED_ASK |
updateType | UPDATED_BID |
updateType | SNAPSHOT |
updateType | FORCE_SNAPSHOT |
Cross Prices
Subscribe
Streaming equivalent of REST API Cross Price (v1)
This endpoint generates every second, for any given pair (regardless of exchanges listing), an aggregated VWAP price computed on a customisable sliding window using Kaiko’s optimal liquidity path engine and trades data across all exchanges covered in websocket. The computation is performed as follows:
- Retrieve last optimal liquidity path.
- Listen to trades from all covered exchanges where intermediary pairs are actively traded within the associated sliding time window.
- Compute a VWAP by exchange for all intermediary pairs.
- Compute an aggregated VWAP using the VWAPs per exchange for all intermediary pairs.
- Compute the product of all intermediary pairs.
The endpoint will return 0 along with a boolean field called noTrade set as true (false by default) in case no trade is found within the sliding time window.
Available computation window sizes are : [1s…5s, 10s, 15s, 30s, 1m…5m, 10m, 15m]
Attention points:- When requested pairs is quoted in fiat currency, a fiat FX rate is used.
- DeX markets are excluded.
- The exchanges coverage available through Stream may differ from the exchanges coverage available through our REST APIs.
- The endpoint is constrained by the ability of the exchanges to send their trades on time (e.g.: a trade sent late by an exchange may not be captured in the associated sliding window).
Code samples
curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_spot_exchange_rate_v1_service_v2 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"assets":{"base":"string","quote":"string"},"window":"string","includeExchanges":["string"],"excludeExchanges":["string"]}'
POST /api/stream/aggregates_spot_exchange_rate_v1_service_v2
Body parameter
{
"assets": {
"base": "string",
"quote": "string"
},
"window": "string",
"includeExchanges": [
"string"
],
"excludeExchanges": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | kaikosdkStreamAggregatesSpotExchangeRateV1RequestV2 | true | none |
Example responses
200 Response
{
"result": {
"assets": {
"base": "string",
"quote": "string"
},
"price": 0,
"timestamp": "2019-08-24T14:15:22Z",
"window": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z",
"duration": "string"
},
"noTrade": true
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 kaikosdkStreamAggregatesSpotExchangeRateV1ResponseV2
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» result | kaikosdkStreamAggregatesSpotExchangeRateV1ResponseV2 | false | none | none |
Asset Prices
Subscribe
Streaming equivalent of REST API Asset Price.
This endpoint generates every second, for a given pair, an aggregated VWAP price computed on a customisable sliding window using direct trades data across all exchanges covered in websocket.The computation is performed as follows: - Listen to trades from all covered exchanges where the pair is actively traded within the associated sliding time window.
- Compute a VWAP by exchange
- Compute an aggregated VWAP using the VWAPs per exchange.
The endpoint will return 0 along with a boolean field called noTrade set as true (false by default) in case no trade is found within the sliding time window.
Available computation window sizes are : [1s...5s, 10s, 15s, 30s, 1m...5m, 10m, 15m]
Attention points:- The exchanges coverage available through Stream may differ from the exchanges coverage available through our REST APIs.
- The endpoint is constrained by the ability of the exchanges to send their trades on time (e.g.: a trade sent late by an exchange may not be captured in the associated sliding window).
Code samples
curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/aggregates_spot_direct_exchange_rate_v1_service_v2 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"assets":{"base":"string","quote":"string"},"window":"string","includeExchanges":["string"],"excludeExchanges":["string"]}'
POST /api/stream/aggregates_spot_direct_exchange_rate_v1_service_v2
Body parameter
{
"assets": {
"base": "string",
"quote": "string"
},
"window": "string",
"includeExchanges": [
"string"
],
"excludeExchanges": [
"string"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | kaikosdkStreamAggregatesDirectExchangeRateV1RequestV2 | true | none |
Example responses
200 Response
{
"result": {
"assets": {
"base": "string",
"quote": "string"
},
"price": 0,
"timestamp": "2019-08-24T14:15:22Z",
"window": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z",
"duration": "string"
},
"noTrade": true
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 kaikosdkStreamAggregatesDirectExchangeRateV1ResponseV2
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» result | kaikosdkStreamAggregatesDirectExchangeRateV1ResponseV2 | false | none | none |
FOREX Converted Rates
Subscribe
Kaiko FOREX Converted Rates are designed on top of our Kaiko Benchmark Rates with a conversion to a given foreign exchange currency (Source: TP-ICAP).
The exhaustive list of currencies includes :
- AUD
- CHF
- EUR
- GBP
- JPY
Rates publications are available in real-time and at fixings.
Fields description
A Kaiko Forex Rate consists in a unique indexCode
.
indexCode
is the ticker identifying the rate.commodity
is the type of publication: real-time or fixings.interval
is the time period in which transaction data are considered for the calculation of the index. If an index has an interval of 15 seconds,startTime
andendTime
will be separated by 15s.composition
involves providing the components of the calculation, including theunderlying
rate and thefxrate
.price
is the product of theunderlying
rate and thefxrate
.tsEvent
is the exact time of price publication.
Multiple subscriptions support
You can specify multiple rates at a time by filling indexCode
request field with either:
- wildcard (
*
) : means you get all rates associated with your API key - a comma separated list of rates (for example:
indexCode1,indexCode2,indexCode3
).
Code samples
curl --request POST \
--url https://gateway-v0-http.kaiko.ovh/api/stream/index_forex_rate_v1 \
--header 'Accept: application/swagger-ui+json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: API_KEY' \
--data '{"indexCode":"string","interval":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"}}'
POST /api/stream/index_forex_rate_v1
Body parameter
{
"indexCode": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | kaikosdkStreamIndexForexRateServiceRequestV1 | 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"
},
"composition": {
"underlying": {
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
},
"fxrate": {
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
},
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z",
"detail": {
"underlying": {
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
},
"fxrate": {
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
}
}
},
"error": {
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
}
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 kaikosdkStreamIndexForexRateServiceResponseV1
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» result | kaikosdkStreamIndexForexRateServiceResponseV1 | false | none | none |
Enumerated Values
Property | Value |
---|---|
commodity | SIC_UNKNOWN |
commodity | SIC_REAL_TIME |
commodity | SIC_DAILY_FIXING |
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.
- UNKNOWN: Unknown type.
- TRADE_BUY: TRADE_BUY type.
- TRADE_SELL: TRADE_SELL type.
- TRADE_UNKNOWN: TRADE_UNKNOWN type.
- BEST_ASK: BEST_ASK type.
- BEST_BID: BEST_BID type.
- UPDATED_ASK: UPDATED_ASK type.
- UPDATED_BID: UPDATED_BID type.
- SNAPSHOT: SNAPSHOT type.
- FORCE_SNAPSHOT: FORCE_SNAPSHOT type. Internal use only.
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. - TRADE_UNKNOWN: TRADE_UNKNOWN type. - BEST_ASK: BEST_ASK type. - BEST_BID: BEST_BID type. - UPDATED_ASK: UPDATED_ASK type. - UPDATED_BID: UPDATED_BID type. - SNAPSHOT: SNAPSHOT type. - FORCE_SNAPSHOT: FORCE_SNAPSHOT type. Internal use only. |
Enumerated Values
Property | Value |
---|---|
anonymous | UNKNOWN |
anonymous | TRADE_BUY |
anonymous | TRADE_SELL |
anonymous | TRADE_UNKNOWN |
anonymous | BEST_ASK |
anonymous | BEST_BID |
anonymous | UPDATED_ASK |
anonymous | UPDATED_BID |
anonymous | SNAPSHOT |
anonymous | FORCE_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 |
kaikosdkAssets
{
"base": "string",
"quote": "string"
}
Assets
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
base | string | false | none | Base asset. |
quote | string | false | none | Quote asset. |
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). |
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. |
kaikosdkStreamAggregatedPriceRequestV1
{
"instrumentClass": "string",
"code": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
StreamAggregatedPriceRequestV1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
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. |
interval | kaikosdkDataInterval | false | none | none |
kaikosdkStreamAggregatedPriceResponseV1
{
"aggregate": "string",
"instrumentClass": "string",
"code": "string",
"value": {
"price": "string",
"volume": "string"
},
"eventType": "UNKNOWN",
"tsEvent": "2019-08-24T14:15:22Z"
}
StreamAggregatedPriceResponseV1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
aggregate | string | false | none | Aggregate (interval). |
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. |
value | kaikosdkStreamAggregatedPriceValue | false | none | StreamAggregatedPriceValue is wrapper for update values. |
eventType | kaikosdkStreamAggregatedPriceResponseV1EventType | false | none | EventType is event category for a value. - UNKNOWN: Unknown type. - BEST_ASK: BEST_ASK type. - BEST_BID: BEST_BID type. |
tsEvent | string(date-time) | false | none | Timestamp of event. |
kaikosdkStreamAggregatedPriceResponseV1EventType
"UNKNOWN"
EventType is event category for a value.
- UNKNOWN: Unknown type.
- BEST_ASK: BEST_ASK type.
- BEST_BID: BEST_BID type.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | EventType is event category for a value. - UNKNOWN: Unknown type. - BEST_ASK: BEST_ASK type. - BEST_BID: BEST_BID type. |
Enumerated Values
Property | Value |
---|---|
anonymous | UNKNOWN |
anonymous | BEST_ASK |
anonymous | BEST_BID |
kaikosdkStreamAggregatedPriceValue
{
"price": "string",
"volume": "string"
}
StreamAggregatedPriceValue is wrapper for update values.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
price | string | false | none | Price of top of book entry. |
volume | string | false | none | Volume of top of book entry. |
kaikosdkStreamAggregatedQuoteRequestV2
{
"instrumentClass": "string",
"code": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"includeUnvettedPrice": true
}
StreamAggregatedQuoteRequestV2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
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. |
interval | kaikosdkDataInterval | false | none | none |
includeUnvettedPrice | boolean | false | none | Whether to add an additionnal data point including all exchanges covered by Kaiko Top Of Book Stream for computation. This should be used whenever an asset is not part of the vetted list. Beware that exchange vetted list changes every quarter, so if there is only 1 exchange covering this asset, you should use unvetted as backup to vetted to always have a price. |
kaikosdkStreamAggregatedQuoteResponseV2
{
"aggregate": "string",
"instrumentClass": "string",
"code": "string",
"eventType": "UNKNOWN",
"tsEvent": "2019-08-24T14:15:22Z",
"vetted": {
"price": "string",
"volume": "string"
},
"unvetted": {
"price": "string",
"volume": "string"
}
}
StreamAggregatedQuoteResponseV2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
aggregate | string | false | none | Aggregate (interval). |
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. |
eventType | kaikosdkStreamAggregatedQuoteResponseV2EventType | false | none | EventType is event category for a value. - UNKNOWN: Unknown type. - BEST_ASK: BEST_ASK type. - BEST_BID: BEST_BID type. |
tsEvent | string(date-time) | false | none | Timestamp of event. |
vetted | kaikosdkStreamAggregatedQuoteValue | false | none | StreamAggregatedQuoteValue is wrapper for update values. |
unvetted | kaikosdkStreamAggregatedQuoteValue | false | none | StreamAggregatedQuoteValue is wrapper for update values. |
kaikosdkStreamAggregatedQuoteResponseV2EventType
"UNKNOWN"
EventType is event category for a value.
- UNKNOWN: Unknown type.
- BEST_ASK: BEST_ASK type.
- BEST_BID: BEST_BID type.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | EventType is event category for a value. - UNKNOWN: Unknown type. - BEST_ASK: BEST_ASK type. - BEST_BID: BEST_BID type. |
Enumerated Values
Property | Value |
---|---|
anonymous | UNKNOWN |
anonymous | BEST_ASK |
anonymous | BEST_BID |
kaikosdkStreamAggregatedQuoteValue
{
"price": "string",
"volume": "string"
}
StreamAggregatedQuoteValue is wrapper for update values.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
price | string | false | none | Price of top of book entry. |
volume | string | false | none | Volume of top of book entry. |
kaikosdkStreamAggregatesDirectExchangeRateV1RequestV2
{
"assets": {
"base": "string",
"quote": "string"
},
"window": "string",
"includeExchanges": [
"string"
],
"excludeExchanges": [
"string"
]
}
StreamAggregatesDirectExchangeRateV1RequestV2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assets | kaikosdkAssets | false | none | none |
window | string | false | none | Sliding Window duration (duration string, ex: 1m). |
includeExchanges | [string] | false | none | list of exchange code to include. |
excludeExchanges | [string] | false | none | list of exchange code to exclude. |
kaikosdkStreamAggregatesDirectExchangeRateV1ResponseV2
{
"assets": {
"base": "string",
"quote": "string"
},
"price": 0,
"timestamp": "2019-08-24T14:15:22Z",
"window": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z",
"duration": "string"
},
"noTrade": true
}
StreamAggregatesDirectExchangeRateV1ResponseV2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assets | kaikosdkAssets | false | none | none |
price | number(double) | false | none | Price for the trade. |
timestamp | string(date-time) | false | none | Timestamp of event. |
window | kaikosdkWindow | false | none | Window information. |
noTrade | boolean | false | none | NoTrade: no trade happened during the window. |
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. |
kaikosdkStreamAggregatesSpotExchangeRateV1RequestV2
{
"assets": {
"base": "string",
"quote": "string"
},
"window": "string",
"includeExchanges": [
"string"
],
"excludeExchanges": [
"string"
]
}
StreamAggregatesSpotExchangeRateV1RequestV2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assets | kaikosdkAssets | false | none | none |
window | string | false | none | Sliding Window duration (duration string, ex: 1m). |
includeExchanges | [string] | false | none | list of exchange code to include. |
excludeExchanges | [string] | false | none | list of exchange code to exclude. |
kaikosdkStreamAggregatesSpotExchangeRateV1ResponseV2
{
"assets": {
"base": "string",
"quote": "string"
},
"price": 0,
"timestamp": "2019-08-24T14:15:22Z",
"window": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z",
"duration": "string"
},
"noTrade": true
}
StreamAggregatesSpotExchangeRateV1ResponseV2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assets | kaikosdkAssets | false | none | none |
price | number(double) | false | none | Price for the trade. |
timestamp | string(date-time) | false | none | Timestamp of event. |
window | kaikosdkWindow | false | none | Window information. |
noTrade | boolean | false | none | NoTrade: no trade happened during the window. |
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. |
kaikosdkStreamForexIndexDetail
{
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
}
StreamForexIndexDetail is detail property involved in computation.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | Name. |
price | number(double) | false | none | none |
tsEvent | string(date-time) | false | none | TSEvent. |
kaikosdkStreamForexIndexPublic
{
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
StreamForexIndexPublic is public property involved in computation.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | Name. |
tsEvent | string(date-time) | false | none | TSEvent. |
kaikosdkStreamForexIndexServiceResponseDetail
{
"underlying": {
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
},
"fxrate": {
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
}
}
StreamForexIndexServiceResponseDetail is detail property involved in computation.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
underlying | kaikosdkStreamForexIndexDetail | false | none | StreamForexIndexDetail is detail property involved in computation. |
fxrate | kaikosdkStreamForexIndexDetail | false | none | StreamForexIndexDetail is detail property involved in computation. |
kaikosdkStreamForexIndexServiceResponsePublic
{
"underlying": {
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
},
"fxrate": {
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
}
StreamForexIndexServiceResponsePublic is public property involved in computation.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
underlying | kaikosdkStreamForexIndexPublic | false | none | StreamForexIndexPublic is public property involved in computation. |
fxrate | kaikosdkStreamForexIndexPublic | false | none | StreamForexIndexPublic is public property involved in computation. |
kaikosdkStreamIndexCommodity
"SIC_UNKNOWN"
StreamIndexCommodity allows selecting kind of index update wanted.
- SIC_UNKNOWN: Unknown commodity.
- SIC_REAL_TIME: REAL_TIME commodity.
- SIC_DAILY_FIXING: DAILY_FIXING commodity.
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 |
kaikosdkStreamIndexForexRateServiceRequestV1
{
"indexCode": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
StreamIndexForexRateServiceRequestV1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
indexCode | string | false | none | Index code. |
interval | kaikosdkDataInterval | false | none | none |
kaikosdkStreamIndexForexRateServiceResponseV1
{
"indexCode": "string",
"commodity": "SIC_UNKNOWN",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"composition": {
"underlying": {
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
},
"fxrate": {
"name": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
},
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z",
"detail": {
"underlying": {
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
},
"fxrate": {
"name": "string",
"price": 0,
"tsEvent": "2019-08-24T14:15:22Z"
}
}
}
StreamIndexForexRateServiceResponseV1
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 |
composition | kaikosdkStreamForexIndexServiceResponsePublic | false | none | StreamForexIndexServiceResponsePublic is public property involved in computation. |
price | number(double) | false | none | Price. |
tsEvent | string(date-time) | false | none | none |
detail | kaikosdkStreamForexIndexServiceResponseDetail | false | none | StreamForexIndexServiceResponseDetail is detail property involved in computation. |
kaikosdkStreamIndexMultiAssetsServiceRequestV1
{
"indexCode": "string",
"commodities": [
"SIC_UNKNOWN"
],
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
StreamIndexServiceRequestV1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
indexCode | string | false | none | Index code. |
commodities | [kaikosdkStreamIndexCommodity] | false | none | Enum indicating type of feed. |
interval | kaikosdkDataInterval | false | none | none |
kaikosdkStreamIndexMultiAssetsServiceResponseComposition
{
"underlyingInstrument": "string",
"base": "string",
"quote": "string",
"exchanges": [
"string"
],
"instrumentInterval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"currencyConversion": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
StreamIndexMultiAssetsServiceResponseComposition is the composition used to compute the index.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
underlyingInstrument | string | false | none | Underlying rate of the indices. |
base | string | false | none | Base. |
quote | string | false | none | Quote. |
exchanges | [string] | false | none | Exchanges. |
instrumentInterval | kaikosdkDataInterval | false | none | none |
currencyConversion | string | false | none | Currency conversion. |
tsEvent | string(date-time) | false | none | Timestamp (tick) of underlying rate ts. |
kaikosdkStreamIndexMultiAssetsServiceResponsePair
{
"underlyingInstrument": "string",
"underlyingPrice": 0,
"weightingFactor": 0,
"cappingFactor": 0,
"currencyConversionFactor": 0
}
StreamIndexMultiAssetsServiceResponsePair is the pair information for the rates used
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
underlyingInstrument | string | false | none | Underlying instrument of the indices. |
underlyingPrice | number(double) | false | none | Underlying price of the instrument. |
weightingFactor | number(double) | false | none | Weighting factor of the instrument. |
cappingFactor | number(double) | false | none | Capping factor of the instrument. |
currencyConversionFactor | number(double) | false | none | Currency conversion factor of the instrument. |
kaikosdkStreamIndexMultiAssetsServiceResponsePrices
{
"indexValue": 0,
"divisor": 0,
"pairs": [
{
"underlyingInstrument": "string",
"underlyingPrice": 0,
"weightingFactor": 0,
"cappingFactor": 0,
"currencyConversionFactor": 0
}
]
}
StreamIndexMultiAssetsServiceResponsePrices is the prices informations on the pair used
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
indexValue | number(double) | false | none | Index value. |
divisor | number(double) | false | none | Divisor. |
pairs | [kaikosdkStreamIndexMultiAssetsServiceResponsePair] | false | none | StreamIndexMultiAssetsServiceResponsePair is the pair information for the rates used. |
kaikosdkStreamIndexMultiAssetsServiceResponseV1
{
"commodity": "SIC_UNKNOWN",
"indexCode": "string",
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"mainQuote": "string",
"compositions": [
{
"underlyingInstrument": "string",
"base": "string",
"quote": "string",
"exchanges": [
"string"
],
"instrumentInterval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
},
"currencyConversion": "string",
"tsEvent": "2019-08-24T14:15:22Z"
}
],
"price": {
"indexValue": 0,
"divisor": 0,
"pairs": [
{
"underlyingInstrument": "string",
"underlyingPrice": 0,
"weightingFactor": 0,
"cappingFactor": 0,
"currencyConversionFactor": 0
}
]
},
"tsEvent": "2019-08-24T14:15:22Z",
"tsCompute": "2019-08-24T14:15:22Z"
}
StreamIndexServiceResponseV1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
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. |
indexCode | string | false | none | Index code. |
interval | kaikosdkDataInterval | false | none | none |
mainQuote | string | false | none | Quote. |
compositions | [kaikosdkStreamIndexMultiAssetsServiceResponseComposition] | false | none | List of rates used in indices. |
price | kaikosdkStreamIndexMultiAssetsServiceResponsePrices | false | none | none |
tsEvent | string(date-time) | false | none | Event generation timestamp (event created by Kaiko), after normalization. |
tsCompute | string(date-time) | false | none | Timestamp of computation (differs from ts_event only if a buffer is applied, especially for real time data). |
kaikosdkStreamIndexServiceRequestV1
{
"indexCode": "string",
"commodities": [
"SIC_UNKNOWN"
],
"interval": {
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z"
}
}
StreamIndexServiceRequestV1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
indexCode | string | false | none | Index code. |
commodities | [kaikosdkStreamIndexCommodity] | false | none | Enum indicating type of feed. |
interval | kaikosdkDataInterval | false | none | none |
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
{
"partition": "string",
"price": 0,
"volume": 0,
"count": "string"
}
StreamIndexServiceResponseInstruments is computation result by instruments.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
partition | string | false | none | Partition. |
price | number(double) | false | none | Price. |
volume | number(double) | false | none | Volume. |
count | string(uint64) | false | none | Count. |
kaikosdkStreamIndexServiceResponsePairs
{
"pair": "string",
"weight": 0,
"instruments": [
{
"partition": "string",
"price": 0,
"volume": 0,
"count": "string"
}
]
}
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": [
{
"partition": "string",
"price": 0,
"volume": 0,
"count": "string"
}
]
}
]
}
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": [
{
"partition": "string",
"price": 0,
"volume": 0,
"count": "string"
}
]
}
]
}
],
"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.
- SMUC_UNKNOWN: Unknown commodity.
- SMUC_TRADE: TRADE commodity.
- SMUC_TOP_OF_BOOK: TOP_OF_BOOK commodity.
- SMUC_FULL_ORDER_BOOK: FULL_ORDER_BOOK commodity.
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. If no commodity is specified, you get all commodities by default, otherwise you get only specified commodities. |
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. - TRADE_UNKNOWN: TRADE_UNKNOWN type. - BEST_ASK: BEST_ASK type. - BEST_BID: BEST_BID type. - UPDATED_ASK: UPDATED_ASK type. - UPDATED_BID: UPDATED_BID type. - SNAPSHOT: SNAPSHOT type. - FORCE_SNAPSHOT: FORCE_SNAPSHOT type. Internal use only. |
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. |
kaikosdkWindow
{
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z",
"duration": "string"
}
Window information.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
startTime | string(date-time) | false | none | Start time of the aggregation window. |
endTime | string(date-time) | false | none | End time of the aggregation window. |
duration | string | false | none | none |
protobufAny
{
"@type": "string",
"property1": null,
"property2": null
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
additionalProperties | any | false | none | none |
@type | string | false | none | none |
rpcStatus
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer(int32) | false | none | none |
message | string | false | none | none |
details | [protobufAny] | false | none | none |