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:
# Subscribe to all trades on all exchanges
ws.send({action: 'subscribe', channel: ['trade']})
# Subscribe to a single asset on a single exchange
ws.send({action: 'subscribe', channel: ['deribit.BTC-PERPETUAL.trade']})
# Subscribe to all trades for a given asset across all exchanges
ws.send({action: 'subscribe', channel: ['BTCUSD spot.trade']})The trade subscription returns every trade that occurs as a separate JSON response, such as the below:
{
"type":"trade",
"symbol":"XRP3LUSDT",
"exchange":"huobi",
"id":"22480463",
"price":1.9847,
"amount":10.3907,
"side":"sell",
"timestamp":"2021-04-23T06:50:39.289Z",
"localTimestamp":"2021-04-23T06:52:50.551Z"
}
{
"type":"trade",
"symbol":"CRV-USD",
"exchange":"coinbase",
"id":"611170",
"price":2.4331,
"amount":133.41,
"side":"sell",
"timestamp":"2021-04-23T06:50:09.057Z",
"localTimestamp":"2021-04-23T06:52:50.554Z"
}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.
The subscription returns a snapshot of the number of bids and asks requested, at the frequency requested - for example:
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.
Last updated