WebSocket
WS wss://isot.okte.sk/api/v1/idm/ws
Parameters
:topics |
Enum (orders | orderbook | hubtohub | marketstatus) A comma-delimited list of topics to receive updates for. Default: "all" (receive updates for all topics). |
---|---|
:orderbookfrequency |
Integer The minimum interval between orderbook updates, in milliseconds. Default: 0 ms (no delay). |
Example
WS wss://isot.okte.sk/api/v1/idm/ws?topics=orders,orderbook,hubtohub,marketstatus&orderbookfrequency=500{
"type": "orderbook-snapshot",
"payload": {
"seqNo": 6351,
"timeDelta": 0,
"data": [
{
"period": {
"start": "2024-11-22T09:00:00Z",
"end": "2024-11-22T10:00:00Z",
"isBlock": false,
"tradingEnd": "2024-11-22T08:30:00Z"
},
"statistics": {
"lastTradeTime": "2024-11-22T07:35:29Z",
"lastPrice": 179.9,
"highPrice": 179.9,
"lowPrice": 24,
"totalQuantity": 87764,
"lastQuantity": 46,
"priceDirection": 1
},
"ownStatistics": {
"buy": {
"quantity": 20.1,
"remainingQuantity": 0,
"weigtedAveragePrice": 6.1
},
"sell": {}
},
"buyList": [
{
"price": 62,
"quantity": 6,
"ownQuantity": 0
},
{
"price": 34,
"quantity": 31,
"ownQuantity": 0
},
{
"price": 33,
"quantity": 47,
"ownQuantity": 0
},
{
"price": 32,
"quantity": 89,
"ownQuantity": 0
},
{
"price": 31,
"quantity": 89,
"ownQuantity": 0
},
{
"price": 30,
"quantity": 49,
"ownQuantity": 0
},
{
"price": 29,
"quantity": 72,
"ownQuantity": 0
},
{
"price": 28,
"quantity": 81,
"ownQuantity": 0
},
{
"price": 27,
"quantity": 104,
"ownQuantity": 0
},
{
"price": 26,
"quantity": 126,
"ownQuantity": 0
},
{
"price": 25,
"quantity": 82,
"ownQuantity": 0
},
{
"price": 24,
"quantity": 166,
"ownQuantity": 0
},
{
"price": 23,
"quantity": 272,
"ownQuantity": 0
},
{
"price": 22,
"quantity": 201,
"ownQuantity": 0
},
{
"price": 21,
"quantity": 238,
"ownQuantity": 0
},
{
"price": 20,
"quantity": 341,
"ownQuantity": 0
}
],
"sellList": [],
"blockOrders": []
},
{
"period": {
"start": "2024-11-22T17:00:00Z",
"end": "2024-11-22T19:00:00Z",
"isBlock": true,
"tradingEnd": "2024-11-22T16:30:00Z"
},
"buyList": [],
"sellList": [],
"blockOrders": [
{
"price": 37.6,
"quantity": 23.1,
"direction": "buy"
}
]
}
]
}
}
The previous example shows a message of type orderbook-snapshot, which is sent to the client after the connection is initiated with the orderbook topic or without any topic specified. This message represents the state of the orderbook at that moment. Subsequent messages of type orderbook-change are sent with the seqNo property incremented by one, reflecting changes to the orderbook.
Every message sent via WebSocket has a structure with type and an optional payload property at the root of the JSON object.