(self, product_id='BTC-USD', log_to=None)
| 14 | |
| 15 | class OrderBook(object): |
| 16 | def __init__(self, product_id='BTC-USD', log_to=None): |
| 17 | self._asks = SortedDict() |
| 18 | self._bids = SortedDict() |
| 19 | self._client = PublicClient() |
| 20 | self._sequence = -1 |
| 21 | self._log_to = log_to |
| 22 | if self._log_to: |
| 23 | assert hasattr(self._log_to, 'write') |
| 24 | self._current_ticker = None |
| 25 | self.product_id = product_id |
| 26 | |
| 27 | def reset_book(self): |
| 28 | self._asks = SortedDict() |