Feed 'B' - Global order book
Global book feed, returns only first 25 book levels
Requests
{"event": "bind", "feed": "B", "feedId": "BTC-EUR"}{"event": "unbind", "feed": "B", "feedId": "BTC-USD"}Feed handling
bookLevel = [
0: price (Efx::Price)
1: size (Efx::Size)
]Global book feed sends full snapshot updates.
For a detailed book description
book// snapshot
['B', feed_id, 'S', [
array of bid bookLevel,
array of ask boolLevel
]]
// failed to subscribe
['B', feed_id, 'Z', 2]
// unsubscribed
['B', feed_id, 'U', 0]applyToSnapshot(prevSnapshot, feed, action, data) {
switch (feed) {
case 'B': {
switch (action) {
case 'S': {
return [[...data[0]], [...data[1]]]
}
}
break
}
}
return prevSnapshot
}Last updated