Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alxspectrum opened this issue Nov 29, 2023 · 0 comments

Comments

@alxspectrum
Copy link

alxspectrum commented Nov 29, 2023

    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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@alxspectrum and others