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
684 stars 165 forks source link

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v3/ping (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000007EFEAB070>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')) #183

Closed knowledgecomputer2018 closed 3 years ago

knowledgecomputer2018 commented 3 years ago

hi how are you . what are you doing? your today is good . i have a problem in connect to binance api with my system(windows 8.1) when i connect to binance with request websocket

ws=websocket.WebSocketApp(SOCKET,on_open=on_open,on_error=on_error,on_close=on_close,on_message=on_message)#callback function

i have a problem (title ) but when i connect to api binance with "colab google" i have not error with same code.

thank you very much reply me .

good luck god willing

oliver-zehentleitner commented 3 years ago

Hi!

I know you from other repositories and you need to learn to read error msg :) : "No connection could be made because the target machine actively refused it" Thats not a problem of the lib or so, you need to understand what you are doing....

And without knowing your code its impossible to undertstand the reason and to help you.

I recommend you to use websockets to binance this way: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/master/example_kline_1m_with_unicorn_fy.py

just download it and import missing reuqirements. Then run it and you will get behind how it works...

If you want to stay with websockets lib and not using UBWA then the place for your questions is this repo: https://github.com/aaugustin/websockets

Best regards!