For the complete documentation index, see llms.txt. This page is also available as Markdown.

Feed 'B' - Global order book

Global book feed, returns only first 25 book levels

Requests

{"event": "bind", "feed": "B", "feedId": "BTC-EUR"}

Useinstrument name as "feedId" value to subscribe on instrument book

{"event": "unbind", "feed": "B", "feedId": "BTC-USD"}

Feed handling

bookLevel = [
  0: price (Efx::Price)
  1: size (Efx::Size)
]

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