aestella
aestella
code example.... ``` def web_socket_testing(): class myWebsocketClient(cbpro.WebsocketClient): def on_open(self): self.auth_client = cbpro.AuthenticatedClient(api_key, api_secret, passphrase) def on_message(self, msg): if some criteria.... self.auth_client.place_market_order(product_id='xxx', side='xxx', size='xxx') wsClient = myWebsocketClient() wsClient.start() time.sleep(7000) wsClient.close() if...
I am pretty new to python so please forgive any bad code. I guess my question turns then to how do you call this in effect? Something like this does...