sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.98k stars 2.2k forks source link

futures_socket does not respect test_net argument #1200

Closed erik404 closed 1 year ago

erik404 commented 2 years ago

in streams.py function futures_socket OR futures_user_socker the stream_url is ALWAYS the wss://fstream.binance.{}/ url even though the test_net argument is set to true.

The function should contain the following codeblock and use stream_url var as argument for stream_url in the self._get_account_socket call

For now it is impossible to program against the test_net using this websocket and receive realtime updates.

stream_url = self.FSTREAM_URL if self.testnet: stream_url = self.FSTREAM_TESTNET_URL