| 274 | pass |
| 275 | |
| 276 | class WebsocketConsole(WebsocketClient): |
| 277 | def on_open(self): |
| 278 | self.products = ['BTC-USD', 'ETH-USD'] |
| 279 | self.order_book_btc = OrderBookConsole(product_id='BTC-USD') |
| 280 | self.order_book_eth = OrderBookConsole(product_id='ETH-USD') |
| 281 | |
| 282 | def on_message(self, msg): |
| 283 | self.order_book_btc.process_message(msg) |
| 284 | self.order_book_eth.process_message(msg) |
| 285 | |
| 286 | wsClient = WebsocketConsole() |
| 287 | wsClient.start() |