Open jamierobertson1 opened 3 years ago
It's easy to solved this issue: IN steams.py::: def futures_socket(self)
add:
if self.testnet:
return self._get_account_socket('futures', stream_url=self.FSTREAM_TESTNET_URL)
before the line:
return self._get_account_socket('futures', stream_url=self.FSTREAM_URL)
Firstly thanks for the good work.
I noticed the
ThreadedWebsocketManager::start_futures_socket
never sets the futures testnet url for receiving user data.This is because it calls just
futures_socket
in theBinanceSocketManager
which just defaults toFSTREAM_URL
(rather than switch toFSTREAM_TESTNET_URL
)It would be nice if it automatically selected the testnet if specified in the client.
I've hacked mine work it to work, by adding new
start_testnet_socket
/futures_testnet_socket
functions to the ThreadedWebsocketManager / ThreadedWebsocketManager, but it's not pretty.Seems like it should really something along the lines of the
_get_futures_socket
to get the correct url.Thanks, Jamie