LUCIT-Systems-and-Development / unicorn-binance-websocket-api

A Python SDK by LUCIT to use the Binance Websocket API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, com-coin_futures, us, tr, dex/chain+testnet) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-websocket-api.docs.lucit.tech/
Other
683 stars 164 forks source link

Wrong URI for User Data Stream #86

Closed Flowelfox closed 4 years ago

Flowelfox commented 4 years ago

Check this or we will delete your issue. (fill in the checkbox with an X like so: [x])

Select one:

Environment

Operating System? (include version)

Python Version Requirement

Exact Python Version?

Python 3.8.3

Pip Version?

pip 20.1.1

Dependencies

Package                       Version    Location
----------------------------- ---------- ---------
alembic                       1.4.2
aniso8601                     8.0.0
attrs                         19.3.0
autobahn                      20.4.3
Automat                       20.2.0
certifi                       2020.4.5.1
cffi                          1.14.0
chardet                       3.0.4
cheroot                       8.3.0
click                         7.1.2
colorama                      0.4.3
constantly                    15.1.0
cryptography                  2.9.2
dateparser                    0.7.4
Flask                         1.1.2
Flask-RESTful                 0.3.8
flask-restx                   0.2.0
Flask-SQLAlchemy              2.4.3
hyperlink                     19.0.0
idna                          2.9
incremental                   17.5.0
inprofitapi                   0.1        /inprofit
itsdangerous                  1.1.0
jaraco.functools              3.0.1
Jinja2                        2.11.2
jsonschema                    3.2.0
Mako                          1.1.3
MarkupSafe                    1.1.1
more-itertools                8.3.0
pathlib                       1.0.1
pip                           20.1.1
psutil                        5.7.0
psycopg2-binary               2.8.5
pyasn1                        0.4.8
pyasn1-modules                0.2.8
pycparser                     2.20
PyHamcrest                    2.0.2
pyOpenSSL                     19.1.0
pyrsistent                    0.16.0
python-binance                0.7.5
python-dateutil               2.8.1
python-editor                 1.0.4
pytz                          2020.1
regex                         2020.5.14
requests                      2.23.0
service-identity              18.1.0
setuptools                    47.1.1
six                           1.15.0
SQLAlchemy                    1.3.17
Twisted                       20.3.0
txaio                         20.4.1
tzlocal                       2.1
ujson                         3.0.0
unicorn-binance-websocket-api 1.16.3
unicorn-fy                    0.4.1
urllib3                       1.25.9
websocket-client              0.57.0
websockets                    8.1
Werkzeug                      1.0.1
wheel                         0.34.2
zope.interface                5.1.0

UNICORN Binance WebSocket API Version?

Did you upgrade to the latest release version with `pip install unicorn-binance-websocket-api --upgrade`?
Yes, i am using version 1.16.3

Please control what version you are using with this script and post the output: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/master/tools/get_used_module_version.py

Description of your issue

I don't know why and when this error appear, but library generating wrong uri when connecting to userDataStream. Uri generated in "unicorn_binance_websocket_api:111-113" is "https://api.binance.com//api/v3/userDataStream", double slash after domain. Response for POST request is 404 with html body, so json can't parse it.

After update 1.16.3 library started processing exception and trying again and again, but uri still wrong and can't create listen key for user data stream.

oliver-zehentleitner commented 4 years ago

Hi Flowelcat! I am very out of time atm. If you submit a PR i would be very happy about it. Best regards, Oliver

Flowelfox commented 4 years ago

I checked this issue again today and somehow it working now. URI is still has value "'https://api.binance.com//api/v3/userDataStream'". Now binance answering with http code 200 and everything work fine.

oliver-zehentleitner commented 4 years ago

maybe binance had some issues :)

please let this report open, i want to remove the double slash anyway.

oliver-zehentleitner commented 4 years ago

https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/pull/87

Thank you!