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

Can't connect Binance API using websocket #10

Open
K-tang-mkv opened this issue Aug 19, 2021 · 5 comments
Open

Can't connect Binance API using websocket #10

K-tang-mkv opened this issue Aug 19, 2021 · 5 comments

Comments

@K-tang-mkv
Copy link

K-tang-mkv commented Aug 19, 2021

When I command "wscat -c wss://stream.binance.com:9443/ws/btcusdt@trade"
it got an error "error: connect ETIMEDOUT 69.171.246.9:9443" everytime.

@macrobody
Copy link

I tried the exact command and it works:
Microsoft Windows [Version 10.0.19043.1165]
(c) Microsoft Corporation. All rights reserved.

C:\Users\macro>wscat -c wss://stream.binance.com:9443/ws/btcusdt@trade
Connected (press CTRL+C to quit)
< {"e":"trade","E":1629394609694,"s":"BTCUSDT","t":1013351810,"p":"45746.58000000","q":"0.01189200","b":7235742249,"a":7235742622,"T":1629394609694,"m":true,"M":true}

Maybe a problem in your router, your vpn or your country from where you connect?

@K-tang-mkv
Copy link
Author

I tried the exact command and it works:
Microsoft Windows [Version 10.0.19043.1165]
(c) Microsoft Corporation. All rights reserved.

C:\Users\macro>wscat -c wss://stream.binance.com:9443/ws/btcusdt@trade
Connected (press CTRL+C to quit)
< {"e":"trade","E":1629394609694,"s":"BTCUSDT","t":1013351810,"p":"45746.58000000","q":"0.01189200","b":7235742249,"a":7235742622,"T":1629394609694,"m":true,"M":true}

Maybe a problem in your router, your vpn or your country from where you connect?

I did the same thing on my Mac, but I really don't know what's going on. It always gets an error whether I use VPN. And I'm from China mainland.

@macrobody
Copy link

I just had my VPN connect with China and when I run the command I get this:

C:\Users\macro>wscat -c wss://stream.binance.com:9443/ws/btcusdt@trade
error: read ECONNRESET

So, logical conclusion to me is that China ipaddress gets blocked by binance

@K-tang-mkv
Copy link
Author

when i use tcping to test the endpoint, I got a message that the endpoint was closed.
MacBook-Air ~ % tcping 69.171.246.9 9443
69.171.246.9 port 9443 closed.

@K-tang-mkv
Copy link
Author

I just had my VPN connect with China and when I run the command I get this:

C:\Users\macro>wscat -c wss://stream.binance.com:9443/ws/btcusdt@trade
error: read ECONNRESET

So, logical conclusion to me is that China ipaddress gets blocked by binance

Thank you! I already know the reason!

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