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.
1
ws.send({action: 'subscribe', channel: ['BTCUSD spot'.combined_orderbook]})
Copied!
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
1
exchanges_fees = {
2
'bitmex': -0.0005,
3
'deribit': 0,
4
'binance': 0
5
}
6
7
payload = {
8
action: 'subscribe',
9
channel: ['BTCUSD spot.combined_orderbook'],
10
fees: exchange_fees
11
}
12
13
ws.send(payload)
Copied!

Fees Parameters

Parameter
Type
Required
Description
exchange
string
no
Exchange name
fee
numeric
no
Relevant fee expressed as a percentage (e.g. 0.075% (7.5bp) would be 0.00075)

Combined Orderbook Returns

The Combined Orderbook subscription returns frequent book snapshots (on every change to the top levels) in the format below:
1
{
2
"type":"book_snapshot",
3
"bids":[
4
{
5
"price":49413.18735,
6
"amount":0.000006,
7
"exchange":"binance-us"
8
},
9
{
10
"price":49410.97956,
11
"amount":0.021968,
12
"exchange":"binance-us"
13
},
14
{
15
"price":49409.36118,
16
"amount":0.02,
17
"exchange":"bitflyer"
18
},
19
{
20
"price":49406.45409000001,
21
"amount":0.07991,
22
"exchange":"binance-us"
23
},
24
{
25
"price":49403.93661,
26
"amount":0.071702,
27
"exchange":"binance-us"
28
}
29
],
30
"asks":[
31
{
32
"price":49524.08461,
33
"amount":0.071701,
34
"exchange":"binance-us"
35
},
36
{
37
"price":49530.84136,
38
"amount":0.121282,
39
"exchange":"binance-us"
40
},
41
{
42
"price":49533.854369999994,
43
"amount":0.04,
44
"exchange":"binance-us"
45
},
46
{
47
"price":49536.76727999999,
48
"amount":0.1902,
49
"exchange":"bitflyer"
50
},
51
{
52
"price":49537.55806999999,
53
"amount":0.0804,
54
"exchange":"binance-us"
55
}
56
],
57
"mid":"49468.64"
58
}
Copied!
The subscription also returns any trades that occur across any of these instruments in the format below:
1
{
2
"type":"trade",
3
"symbol":"XBT/USD",
4
"exchange":"kraken",
5
"price":49471.6,
6
"amount":0.02111405,
7
"side":"buy",
8
"timestamp":"2021-04-23T06:10:25.995Z",
9
"localTimestamp":"2021-04-23T06:10:26.493Z",
10
"inverse":false,
11
"takerFee":0.0026
12
}
13
14
{
15
"type":"trade",
16
"symbol":"BTCUSD",
17
"exchange":"binance-us",
18
"id":"11054072",
19
"price":49474.61,
20
"amount":0.001346,
21
"side":"buy",
22
"timestamp":"2021-04-23T06:10:26.454Z",
23
"localTimestamp":"2021-04-23T06:10:26.495Z",
24
"inverse":false,
25
"takerFee":0.001
26
}
Copied!
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:
1
channel = ['BTCUSD spot.spread']
Copied!

Orderbook Dynamics

The descriptive statistics outlined in the Orderbook Dynamics section are also valid on Combined Orderbooks.
Last modified 6mo ago