(deprecated) Trade Data Stream
Connect
- The base API endpoint is: https://api.binance.com
- A User Data Stream
listenKeyis valid for 60 minutes after creation. - Doing a
PUTon alistenKeywill extend its validity for 60 minutes. - Doing a
DELETEon alistenKeywill close the stream and invalidate thelistenKey. - Doing a
POSTon an account with an activelistenKeywill return the currently activelistenKeyand extend its validity for 60 minutes. - A
listenKeyis a stream. - Users can listen to multiple streams.
- The base websocket endpoint is: wss://stream.binance.com:9443
- User Data Streams are accessed at /ws/<listenKey> or /stream?streams=<listenKey>
- A single connection to stream.binance.com is only valid for 24 hours; expect to be disconnected at the 24 hour mark
Event: Order Update
Description
Orders are updated with the executionReport event.
Execution types:
- NEW - The order has been accepted into the engine.
- CANCELED - The order has been canceled by the user.
- REPLACED (currently unused)
- REJECTED - The order has been rejected and was not processed (This message appears only with Cancel Replace Orders wherein the new order placement is rejected but the request to cancel request succeeds.)
- TRADE - Part of the order or all of the order's quantity has filled.
- EXPIRED - The order was canceled according to the order type's rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance).
- TRADE_PREVENTION - The order has expired due to STP trigger.
Event Name
executionReport
Payload
Schema:
executionReport
If the order is an OCO, an event will be displayed named listStatus in addition to the
executionReport event.
Schema:
listStatus
Event: Account Update
Description
outboundAccountPosition is sent any time an account balance has changed and contains the assets
that were possibly changed by the event that generated the balance change.
Event Name
outboundAccountPosition
Payload
Schema:
outboundAccountPosition
Event: Balance Update
Description
Balance Update occurs during the following:
- Deposits or withdrawals from the account
- Transfer of funds between accounts (e.g. Spot to Margin)
Event Name
balanceUpdate
Payload
Schema:
balanceUpdate
Event: Listen Key Expire
Description
This event is sent when the listen key expires. No more events will be sent after this until a new listenKey is created. This event will not be pushed when the stream is closed normally.
Event Name
listenKeyExpired
Payload
Schema:
listenKeyExpired