ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
32.52k stars 7.47k forks source link

re-open: Gate IO ccxt pro connection issue #11039

Closed pickmone closed 2 years ago

pickmone commented 2 years ago

MUST READ THIS BEFORE SUBMITTING ISSUES (read the links, then delete this message before submitting):

Make sure your local version of CCXT is up to date. Check by comparing the output of ccxt.version to https://github.com/ccxt/ccxt/blob/master/package.json#L3

gate_exchange = ccxtpro.gateio()

markets = gate_exchange.load_markets()
exception thrown: gateio GET https://api.gateio.ws/api/v4/spot/currencies
Request: GET https://api.gateio.ws/api/v4/spot/currencies None None
raise ClientConnectorSSLError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host api.gateio.ws:443 ssl:default [[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)]
kroitor commented 2 years ago

@pickmone what is your version of urllib3 ?

pickmone commented 2 years ago

1.26.7

kroitor commented 2 years ago

@pickmone does it solve the issue if you downgrade it to 1.26.2 ?

pickmone commented 2 years ago

just tried. still same exception thrown :(

kroitor commented 2 years ago

@pickmone do you use any kind of proxies? Or do you have proxy settings on your environment variables?

pickmone commented 2 years ago

nope, I don't use any of that

pickmone commented 2 years ago

seems to be only gate io. all others I tried are fine (ftx, binance, okex, kucoin, bitfinex). I m quite stumped.

pickmone commented 2 years ago

found the issue. apparently an issue with my IP address.

thanks

rocco-piovani commented 2 years ago

found the issue. apparently an issue with my IP address.

thanks

Hi pickmone,

I'm having the same problem only with gateio. can you tell me how you solved it? Thank you

pickmone commented 2 years ago

Hey - I had to use VPN. so now I just use VPN when accessing gate.

Kinzowa commented 11 months ago

I'm facing the same issue when listening to host fx-ws.gateio.ws on port 443 from my local machine : unknown error (_ssl.c:1007)

The error only affect perp markets such as BTC/USD:BTC and ETH/USDT:USDT but not BTC/USDT and ETH/USDT.

Python 3.10.12 urllib3==2.0.6 OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

$ openssl s_client -connect fx-ws.gateio.ws:443 -servername fx-ws.gateio.ws
CONNECTED(00000003)
40B78B3E827F0000:error:0A0003E8:SSL routines:ssl3_read_bytes:reason(1000):../ssl/record/rec_layer_s3.c:1584:SSL alert number 0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 317 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---