(self, product_id=None)
| 238 | ''' Logs real-time changes to the bid-ask spread to the console ''' |
| 239 | |
| 240 | def __init__(self, product_id=None): |
| 241 | super(OrderBookConsole, self).__init__(product_id=product_id) |
| 242 | |
| 243 | # latest values of bid-ask spread |
| 244 | self._bid = None |
| 245 | self._ask = None |
| 246 | self._bid_depth = None |
| 247 | self._ask_depth = None |
| 248 | |
| 249 | def process_message(self, message): |
| 250 | if message.get('product_id') == self.product_id: |