MCPcopy Create free account
hub / github.com/danpaquin/coinbasepro-python / on_open

Method on_open

cbpro/websocket_client.py:152–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected