User Data Streams: How to differentiate outboundAccountPosition, balanceUpdate and executionReport when multiple listenKeys are subscribed?

Hi Binance

I’m referring to

I understand multiple listenKeys of Spot accounts can be subscribed to the base websocket endpoint.

How do I differentiate outboundAccountPosition, balanceUpdate and executionReport related to which listenKey (ie. account) as API documentation does not include the UserID?

Best regards

Use this URL - /stream?streams=// and the stream name would show in every message

Thanks MJW for the reply.

I intend to subscribe listenKeys as follows:
{“method”: “SUBSCRIBE”,“params”:[“listenKey”],“id”: 1}

Are you saying relevant listenKey appear as follows?
“e”: “outboundAccountPosition”, //Event type
“listenKey”: “xyz”

Thank you.

This is another right way - called dynamical subscription

I tried with two listenkeys as per the dynamical subscription, but I don’t receive any stream name in executionReport or outboundAccountPosition.

Here is the real executionReport received:

Here is the real outboundAccountPosition received:

Thank you.

  1. Thank you aisling, “stream?streams=<listenKey_a>/<listenKey_b>/<listenKey_c>” method works and I get stream names as you mentioned.

  2. I understand, a single websocket connection can listen to a maximum of 1024 streams. Does that means I can provide maximum of 1024 listenKeys to the parameter “stream?streams=” without violating any length issues?

  3. However, the disadvantage of the Combined streams method is, listenKeys required to be known at the time of websocket creation (eg. UTC midnight). Any new trader come after the UTC midnight, has to wait maximum one day (until after next UTC midnight), to start his first trade!

Therefore, can we request to include the stream name to the outboundAccountPosition, balanceUpdate and executionReport when subscribe via the dynamical subscription method (ie. {“method”: “SUBSCRIBE”,“params”:[“listenKey”],“id”: 1})?

So that returned JSONs are of following format:
“e”: “outboundAccountPosition”, //Event type
“stream”: “listenKey_x”,


Apparently, adding a new key/value to JSON does not break the API, or does not break any users’ application. Does Binance see any disadvantage to our this proposal?

Note, Binance may omit the stream name for JSONs returned for single listenKey subscription using /ws/“listenKey”.

Thank you.

Try to subscribe as:


Then the received websocket update will be:

{"stream": "listenKey_b", "data":{ "e": "outboundAccountPosition"...}}
{"stream": "listenKey_a", "data": {"e": "balanceUpdate"...}}