Combined Orderbook

The Combined Orderbook normalizes currency pairs across exchanges, adjusts the prices for the fees payable to trade at those levels, and recreates a cross-exchange orderbook.

You can access a Combined Orderbook for any currency that trades against USD. This will aggregate all orderbooks across all exchanges where that currency trades, adjust these for the taker fee, and maintain a fee-adjusted orderbook of all bids and asks across all these exchanges.

This gives you the ability to see a true-cost representation of the current market bid/ask, and a better idea of the true mid market price. The Combined Orderbook feeds into execution algorithms, smart order routing and liquidity analyses to determine optimal trade execution routes and to more effectively make markets across exchanges.

ws.send({action: 'subscribe', channel: ['BTCUSD spot'.combined_orderbook]})

The Bids and Asks are all adjusted for the first-tier Taker Fee on each exchange, where you pay a different fee due to trading volume incentives or VIP programmes, you can provide a tailored fee for that exchange.

Fee Adjustment Coming Soon

exchanges_fees = {
    'bitmex': -0.0005,
    'deribit': 0,
    'binance': 0
}

payload = {
    action: 'subscribe',
    channel: ['BTCUSD spot.combined_orderbook'],
    fees: exchange_fees
}

ws.send(payload)

Fees Parameters

Combined Orderbook Returns

The Combined Orderbook subscription returns frequent book snapshots (on every change to the top levels) in the format below:

{
   "type":"book_snapshot",
   "bids":[
      {
         "price":49413.18735,
         "amount":0.000006,
         "exchange":"binance-us"
      },
      {
         "price":49410.97956,
         "amount":0.021968,
         "exchange":"binance-us"
      },
      {
         "price":49409.36118,
         "amount":0.02,
         "exchange":"bitflyer"
      },
      {
         "price":49406.45409000001,
         "amount":0.07991,
         "exchange":"binance-us"
      },
      {
         "price":49403.93661,
         "amount":0.071702,
         "exchange":"binance-us"
      }
   ],
   "asks":[
      {
         "price":49524.08461,
         "amount":0.071701,
         "exchange":"binance-us"
      },
      {
         "price":49530.84136,
         "amount":0.121282,
         "exchange":"binance-us"
      },
      {
         "price":49533.854369999994,
         "amount":0.04,
         "exchange":"binance-us"
      },
      {
         "price":49536.76727999999,
         "amount":0.1902,
         "exchange":"bitflyer"
      },
      {
         "price":49537.55806999999,
         "amount":0.0804,
         "exchange":"binance-us"
      }
   ],
   "mid":"49468.64"
}

The subscription also returns any trades that occur across any of these instruments in the format below:

{
   "type":"trade",
   "symbol":"XBT/USD",
   "exchange":"kraken",
   "price":49471.6,
   "amount":0.02111405,
   "side":"buy",
   "timestamp":"2021-04-23T06:10:25.995Z",
   "localTimestamp":"2021-04-23T06:10:26.493Z",
   "inverse":false,
   "takerFee":0.0026
}

{
   "type":"trade",
   "symbol":"BTCUSD",
   "exchange":"binance-us",
   "id":"11054072",
   "price":49474.61,
   "amount":0.001346,
   "side":"buy",
   "timestamp":"2021-04-23T06:10:26.454Z",
   "localTimestamp":"2021-04-23T06:10:26.495Z",
   "inverse":false,
   "takerFee":0.001
}

This shows the price and amount traded, along with whether the amount is inverse (as in some perpetual swaps) and the given taker fee, by default the marginal taker fee for a new trader. The price is not adjusted for taker fee, this is the actual reported trade price as per the exchange.

Adjusted Spreads

Coming Soon

You can get the fee-adjusted spread for the asset (i.e. fee adjusted best ask minus fee adjusted best bid) on a streaming asset for any of the Combined Orderbook pairs. This gives a real world indication of the current price of immediacy and is useful in conjunction with the volatility subscription as part of market making strategies.

You can subscrive in the below format:

channel = ['BTCUSD spot.spread']

Orderbook Dynamics

The descriptive statistics outlined in the Orderbook Dynamics section are also valid on Combined Orderbooks.

Last updated