Skip to main content

Module book

Module book 

Source
Expand description

l2Book: a market’s visible book, the same shape from /info and from the socket, and the precision it is asked at. Prices and sizes are exact Dec values read from the venue’s strings.

Structs§

Book
l2Book: at most twenty levels a side, best first. There is no sequence number; each read or frame replaces the last.
Level
One price level: n orders resting at px for sz in all.
Precision
How finely a book’s levels are bucketed: full precision, or 2 to 5 significant figures, and at 5 figures a step of 1, 2 or 5 in the last.

Functions§

l2_book
l2_book_request
{"type":"l2Book","coin":..,"nSigFigs"?,"mantissa"?}. A coin is BTC, xyz:XYZ100 on a HIP-3 dex, @107 or PURR/USDC for a pair, #14730 for an outcome side.