Unified order book (market depth) data.
Contains sorted bid and ask price levels, each as [price, amount] pairs.
Bids are sorted highest-first, asks lowest-first.
Fields
symbol- Unified symbol (e.g., "BTC/USDT")timestamp- Exchange timestamp in millisecondsdatetime- ISO 8601 datetime stringnonce- Incremental update sequence numberbids- List of bid levels as[price, amount]pairs, highest firstasks- List of ask levels as[price, amount]pairs, lowest firstinfo- Raw exchange response
Summary
Functions
Returns the best (lowest) ask price, or nil if empty/malformed.
Returns the best (highest) bid price, or nil if empty/malformed.
JSON Schema for the OrderBook unified type.
Returns the spread (best ask price - best bid price), or nil if either side is empty/malformed.
Types
Functions
Returns the best (lowest) ask price, or nil if empty/malformed.
Returns the best (highest) bid price, or nil if empty/malformed.
@spec schema() :: map()
JSON Schema for the OrderBook unified type.
Returns the spread (best ask price - best bid price), or nil if either side is empty/malformed.