MCPcopy Create free account
hub / github.com/ccxt/ccxt / __init__

Method __init__

python/ccxt/async_support/base/ws/order_book.py:61–66  ·  view source on GitHub ↗
(self, snapshot={}, depth=None)

Source from the content-addressed store, hash-verified

59
60class CountedOrderBook(OrderBook):
61 def __init__(self, snapshot={}, depth=None):
62 copy = Exchange.extend(snapshot, {
63 'asks': order_book_side.CountedAsks(snapshot.get('asks', []), depth),
64 'bids': order_book_side.CountedBids(snapshot.get('bids', []), depth),
65 })
66 super(CountedOrderBook, self).__init__(copy, depth)
67
68# -----------------------------------------------------------------------------
69# indexed by order ids (3rd value in a bidask delta)

Callers

nothing calls this directly

Calls 3

extendMethod · 0.45
getMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected