basana.external.binance.order_book_diff¶
- class basana.external.binance.order_book_diff.OrderBookDiffEvent(when, order_book_diff)¶
Bases:
EventAn event for order book diffs.
- Parameters:
when (datetime) – The datetime when the event occurred. It must have timezone information set.
order_book_diff (OrderBookDiff) – The order book diff.
- order_book_diff: OrderBookDiff¶
The order book diff.
- class basana.external.binance.order_book_diff.OrderBookDiff(pair, json)¶
An order book diff as described in https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream
- Parameters:
pair (Pair)
json (dict)
- property final_update_id: int¶
The final update id.
- property first_update_id: int¶
The first update id.
- json: dict¶
The JSON representation.