Normalized Data
Channels allowing access to streaming, normalized data from any combination of exchanges and assets

Trades

Subscribe to all trades, or only those for a specific instrument:
1
# Subscribe to all trades on all exchanges
2
ws.send({action: 'subscribe', channel: ['trade']})
3
4
# Subscribe to a single asset on a single exchange
5
ws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.trade']})
6
7
# Subscribe to all trades for a given asset across all exchanges
8
ws.send({action: 'subscribe', channel: ['BTCUSD spot.trade']})
Copied!
Currently, only asset pairs vs USD are normalized across all exchanges for combined streaming. If you need other pairs please get in touch and we will activate as a priority.
The trade subscription returns every trade that occurs as a separate JSON response, such as the below:
1
{
2
"type":"trade",
3
"symbol":"XRP3LUSDT",
4
"exchange":"huobi",
5
"id":"22480463",
6
"price":1.9847,
7
"amount":10.3907,
8
"side":"sell",
9
"timestamp":"2021-04-23T06:50:39.289Z",
10
"localTimestamp":"2021-04-23T06:52:50.551Z"
11
}
12
13
{
14
"type":"trade",
15
"symbol":"CRV-USD",
16
"exchange":"coinbase",
17
"id":"611170",
18
"price":2.4331,
19
"amount":133.41,
20
"side":"sell",
21
"timestamp":"2021-04-23T06:50:09.057Z",
22
"localTimestamp":"2021-04-23T06:52:50.554Z"
23
}
Copied!
The responses are normalized for each exchange, but are not adjusted for fees or inverted pricing (e.g. some perpetual swaps).

Orderbooks

Standard orderbooks are available in customizable snapshots or as deltas, with each response updating the state of the book from the previous message. You can also subscribe to a combined, normalized and fee-adjusted orderbook for all underlying exchanges for a given asset.
1
# Subscribe to all 1 minute book summaries for all assets on all exchanges
2
ws.send({action: 'subscribe', channel: ['book_snapshots']})
3
4
# Subscribe to Deribit's BTC-PERPETUAL instrument, top 5 levels, updated every 100ms
5
ws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.book_snapshot_5_100ms']})
6
7
# Subscribe to Bitmex's XBTUSD instrument, best bid and ask, updated on every change
8
ws.send({action: 'subscribe', channel: ['bitmex.XBTUSD.book_snapshot_1_0ms']}
9
10
# Subscribe to book deltas for Deribit's BTC-PERPETUAL
11
ws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.book_change']})
12
13
# Subscribe to the combined, fee-adjusted orderbook for BTCUSD across all exchanges
14
ws.send({action: 'subscribe', channel: ['BTCUSD perpetual.combined_orderbook']})
Copied!
You must also provide the type (e.g. perpetual, spot) for a Combined Orderbook - perpetuals can trade at a legitimate spread to spot and including them in the same orderbook leads to inconsistency. You can, however, subscribe to both at the same time.
The subscription returns a snapshot of the number of bids and asks requested, at the frequency requested - for example:
1
{
2
"type":"book_snapshot",
3
"symbol":"BSVBULL/USDT",
4
"exchange":"ftx",
5
"depth":5,
6
"interval":60000,
7
"bids":[
8
{
9
"price":0.0112225,
10
"amount":127070
11
},
12
{
13
"price":0.01113,
14
"amount":2360
15
},
16
{
17
"price":0.0111275,
18
"amount":689720
19
},
20
{
21
"price":0.0110775,
22
"amount":848160
23
},
24
{
25
"price":0.011,
26
"amount":908910
27
}
28
],
29
"asks":[
30
{
31
"price":0.0114675,
32
"amount":176670
33
},
34
{
35
"price":0.0115375,
36
"amount":170370
37
},
38
{
39
"price":0.0117,
40
"amount":720890
41
},
42
{
43
"price":0.0118775,
44
"amount":133290
45
},
46
{
47
"price":0.0118925,
48
"amount":629000
49
}
50
],
51
"timestamp":"2021-04-23T06:54:00.000Z",
52
"localTimestamp":"2021-04-23T06:56:27.821Z"
53
}
Copied!

Pattern Subscriptions

Subscribe to multiple streams in the same request using a pattern subscription, for example you could subscribe to every trade on a given exchange, or every Option and Future on Deribit with a given expiry date.
1
# Subscribe to all trades on Deribit
2
ws.send({action: 'subscribe', channel: ['deribit.*.trade']})
3
4
# Subscribe to all trades on Deribit in BTC Options and Futures with given expiry
5
ws.send({action: 'subscribe', channel: ['deribit.BTC-31DEC21*.trade']})
6
7
# Subscribe to all channels for BTC-PERPETUAL
8
ws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.*']})
Copied!
NOTE: Subscribing to all channels can deliver vast amounts of data, including very similar data such as every quantile measurement. Overly broad pattern subscriptions are not recommended unless you have a very specific use case that requires them.
Last modified 5mo ago