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

Method on_message

cbpro/websocket_client.py:133–137  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

131 print("\n-- Socket Closed --")
132
133 def on_message(self, msg):
134 if self.should_print:
135 print(msg)
136 if self.mongo_collection: # dump JSON to given mongo collection
137 self.mongo_collection.insert_one(msg)
138
139 def on_error(self, e, data=None):
140 self.error = e

Callers 1

_listenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected