-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
load_markets is throwing an "Max retries exceeded" exception #2522
Description
Hello,
This started happening April 7th, and my code has been previously working for 2 months unchanged.
- OS: Mac Sierra (10.12.6)
- Programming Language version: Python 3.5.1
- CCXT version: 1.12.117 and 1.10.810
- Exchange: Binance
- Method: load_markets
I do:
import ccxt
...
self.coinExchange = ccxt.binance({ 'verbose': True }) # works
self.coinMarket = self.coinExchange.load_markets () # throws
load_markets throws with this error:
EXCEPTION OCCURRED IN ccxtUtils.py, IN getCoinData FUNCTION - binance https://api.binance.com/api/v1/exchangeInfo GET HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/exchangeInfo (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)'),))
My code pings the exchange to get a price once every 40 seconds. It was doing that for perhaps 9 hours and I noticed it had stopped. When I restarted the app, it had this exception.
This is new behavior, like I said the code (to call load_markets) was working fine for months prior. I tried updating to the latest ccxt version and that didn't help. I've searched online and no luck so far. Perhaps it has to do with pinging the exchange once every 40 seconds; that is something new that I started late last week, and up to Saturday the 7th, it was working fine.
My code to get the price is:
symbol = self.coinMarket[symbolString]['id'] # given a symbolString like 'HSRBTC'
params = {'symbol': symbol}
res = self.coinExchange.publicGetTickerPrice (params)
I can log into Binance fine, it doesn't report any issues (like it hates me now or anything odd).
Any ideas?
Thanks,
Don