(self, snapshot={}, depth=None)
| 59 | |
| 60 | class 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) |