python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Differentiate between spot/margin/isolated accounts on user data streams.

Open alxspectrum opened this issue 2 years ago • 0 comments

    def start_user_socket(self, callback: Callable) -> str:
        return self._start_async_socket(
            callback=callback,
            socket_name='user_socket',
            params={}
        )

    def start_margin_socket(self, callback: Callable) -> str:
        return self._start_async_socket(
            callback=callback,
            socket_name='margin_socket',
            params={}
        )

Subscribing to these 2 websockets as an example, both give this response:

{
  "e": "outboundAccountPosition", //Event type
  "E": 1564034571105,             //Event Time
  "u": 1564034571073,             //Time of last account update
  "B": [                          //Balances Array
      {
        "a": "ETH",                 //Asset
        "f": "10000.000000",        //Free
        "l": "0.000000"             //Locked
      }
  ]
}

Is it possible to know for which account this change corresponds to ?

alxspectrum avatar Nov 29 '23 22:11 alxspectrum