Streaming Binance Order Updates Using Python
The detailed steps to stream your order and account update from Binance.
In previous articles, I wrote about the steps for live market data streaming from crypto exchanges, as well as streaming order & fill updates from FTX.
Streaming from Binance is not so straightforward as FTX, but still feasible.
1. Get Binance API and Secret 2. Streaming Order Updates 2.1. Generate Listen Key 2.2. Websocket Endpoints 2.3. Streaming Connection 2.4. Message Processing 2.5. Additional notes
1. Get Binance API and Secret
You may skip this session if you are familiar with the steps. Just make sure you set it for the intended purpose: spot & margin or futures trading or both.

- Log in to your Binance account.
- Go to your Profile, and under API Management page, enter your new API key name to “Create”.
- Binance will ask for a code from your email and a code from your authentication app. Enter the codes and click “Submit”.
- The new API key is now created. Note that the secret key is only visible to you this step and will be hidden afterwards. So remember to securely save it for your future references.
- Edit API key permissions.
- Save the changes by entering a code from your authentication app.
2. Streaming Order Updates
Unlike the endpoints and channels used for market data streaming, to stream the order and account update, you need to create a User Data Stream with unique listen key, which needs to be generated each time you start a new connection.
2.1. Generate Listen Key
The base API endpoint is different for Spot and Futures:
- Binance Spot & Margin: https://api.binance.com
- Binance Futures: https://fapi.binance.com









