-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
How to access isolated margin user data stream? #109
Comments
There are 3 Userdata streams in the example for 3 different endpoints. com, je and us i think. it should be obvious to you if you read the names of the vars! You can try to comment full lines with # to disable the code row and test if its still working. |
I'm sorry its not obvious to me of how to set this up, i'm new python and coding in general. PLEASE can you add an example of a isolated margin account line in the "example_userdata_stream.py". I'm sure i'm not alone and that more people would appreciate your guidance. |
Its not tested, hope it works!
Good luck! |
I dont understand, is this supposed to work for ISOLATED margin accounts? I can only receive data from my CROSS margin account using this code. Nowhere is it obvious where to input the symbol pair for ISOLATED margin account needed. |
uh, ok, i did not understand your request. isolated margin is new for me, did not know that. https://binance-docs.github.io/apidocs/spot/en/#user-data-streams
The lib just offers spot and margin support. we have to update the code to add isolated support. |
Here is a pre release with support for isolated_margin: I am not able to test it! Would you test it and give me feedback? You can install it with this command: Use it with: |
installed update 1.17.0: with code
i get error:
|
This error is in your test.py not in the lib! Its in line 21: Even if you wrote it in the code you posted here, i guess you forgot the |
I got the stream running using that same code a second time (not sure why) but the stream doesnt receive any updates of userdata.
When i try this the websocket receives no data either:
|
Well, adding a symbol is different to all other userDataStreams. I dont know, how binance want the extra parameter, i will ask them in telegram. |
The answer: Thats different to the other userDataStreams, so it needs further code modifications... |
Can you test this please: 7313da1
If not, please post me also the log files, but be careful and remove your api keys and listen_keys before posting them! |
I found a bug and fixed it here: 3673e5e |
When I add this code to the existing code previous:
I get this error:
How am I supposed to update the code properly? |
I am going to prepare a release. |
Current code:
I get these critical errors in log file:
API keys are tested and working on cross margin |
Please can you make one further test, but provide the key and secret with:
Is it working now? If yes, i have an idea where the problem is. |
I fixed the api key thing, please test with 1.17.1. |
Using the same code as above I get error:
|
Ok, you dont get a valid listenkey and the error msg you have received is unknown and not handled by the lib. I added handling of unknown error msg to the code. Please start it again with 1.17.2 and tell me what error code you are receiving. |
with this code:
I get error:
theres something wrong with the symbol parameter sent. "Mandatory parameter 'symbol' was not sent, was empty/null, or malformed." |
I made a few changes and tested it up to the error msg "Isolated margin account does not exist.". I did not add a upper() or lower() function, but in my tests upper case symbol responded a few seconds faster than lower case symbol. i belief it would be good to upper the symbol string before sending it, but i didnt added it for now. So you are able to test with ANKRBTC and ankrbtc. Please tell me how it works better! |
1.17.3 released! |
It works! You're amazing Oliver thank you. |
I rad the post in unicorn_fy. In unicorn_fy I have a lot of open tasks. I think I will find the time for it in the next two weeks. In the mean time you can download the unicorn_fy file, update it and use it. A pull request is appreciated :) |
Please give me your feedback about upper and lower case symbol! |
lowercase and uppercase function identically on my end. |
Thanks! |
Be aware that I made a small change within the next update!
|
a made a new package with this update: 1.17.4 |
Connect to isolated_margin with multiple symbols #111 |
in 1.18.0 |
updated to 1.18.0
I get error:
|
I forgot to rename 2 vars :/ Should be fixed in 1.18.1! |
with this code:
i receive this error:
Everything is working fine using this code on 1.17.3 with "symbols" string set to "symbol" |
sure. we changed symbol to symbols, but binance didnt :D |
pip install unicorn-binance-websocket-api==1.18.2 |
Hi Oliver,
I can successfully connect to user data stream and margin user data stream using :
"example_userdata_stream.py" modifying the exchange to binance.com-margin to access cross margin data
which parts of the "example_userdata_stream.py" code do I modify to access isolated margin user data through the websocket stream?
Thank you
The text was updated successfully, but these errors were encountered: