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:
# Subscribe to all trades on all exchangesws.send({action: 'subscribe', channel: ['trade']})# Subscribe to a single asset on a single exchangews.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.trade']})# Subscribe to all trades for a given asset across all exchangesws.send({action: 'subscribe', channel: ['BTCUSD spot.trade']})
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:
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.
# Subscribe to all 1 minute book summaries for all assets on all exchangesws.send({action: 'subscribe', channel: ['book_snapshots']})# Subscribe to Deribit's BTC-PERPETUAL instrument, top 5 levels, updated every 100msws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.book_snapshot_5_100ms']})# Subscribe to Bitmex's XBTUSD instrument, best bid and ask, updated on every changews.send({action: 'subscribe', channel: ['bitmex.XBTUSD.book_snapshot_1_0ms']}# Subscribe to book deltas for Deribit's BTC-PERPETUALws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.book_change']})# Subscribe to the combined, fee-adjusted orderbook for BTCUSD across all exchangesws.send({action: 'subscribe', channel: ['BTCUSD perpetual.combined_orderbook']})
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:
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.
# Subscribe to all trades on Deribitws.send({action: 'subscribe', channel: ['deribit.*.trade']})# Subscribe to all trades on Deribit in BTC Options and Futures with given expiryws.send({action: 'subscribe', channel: ['deribit.BTC-31DEC21*.trade']})# Subscribe to all channels for BTC-PERPETUALws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.*']})
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.