- Update BBO
- Replace bids/asks (generic container as a source)
- Clear the book
- Check if book is empty
- Get the book state
- Make string representation of the book state
- Update period - 100 ms
- Each update gives up to top 20 levels in canonical order (bids - desc, asks - asc) https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md#partial-book-depth-streams
- Update period - 100 ms
- Each update gives only best bid and best offer https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md#individual-symbol-book-ticker-streams
- Price levels are unique
- Price levels are in correct order in any moment of time
- Prices are unique
- Prices are absolute
- Prices with zero values for levels which are not in book can appear and should be ignored
- Prices with zero values for levels which are in book should be considered as removing of price level
- If new best bid is less, than current - the current bid level should be removed, otherwise - moved down in the book
- If new best ask is greater, than current - the current ask level should be removed, otherwise - moved down in the book
- Thread safety is not required