sammchardy / python-binance

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

user data stream in futures #1359

Open crotestnet opened 9 months ago

crotestnet commented 9 months ago

Hello

I am using this library, and works no problem with Websocket connections, trading etc. I am however unable to get a stream of user data (ie. when order is chaged, closed etc). When using futures_user_socket , if this is the rights one to use, I get API error, which is strange as API works fine everywhere else. Could you please advise how to do connect correctly?

Thanks

PJV0043 commented 8 months ago

If you're facing issues specifically with the futures_user_socket and not with other WebSockets in the Binance library, it's usually due to one of the following reasons:

API Permissions: Ensure that your API key has the necessary permissions. Sometimes, the API key might need different permissions for futures trading.

Using the Right Endpoint: Make sure that you're connecting to the correct WebSocket endpoint. The standard spot market and the futures market have different endpoints.

Listening Key: User data streams typically require a listening key. Ensure you're obtaining the correct listening key for futures and not for the spot market.