(self)
| 150 | |
| 151 | class MyWebsocketClient(cbpro.WebsocketClient): |
| 152 | def on_open(self): |
| 153 | self.url = "wss://ws-feed.pro.coinbase.com/" |
| 154 | self.products = ["BTC-USD", "ETH-USD"] |
| 155 | self.message_count = 0 |
| 156 | print("Let's count the messages!") |
| 157 | |
| 158 | def on_message(self, msg): |
| 159 | print(json.dumps(msg, indent=4, sort_keys=True)) |
nothing calls this directly
no outgoing calls
no test coverage detected