question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CEX in Python 2 [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

See original GitHub issue
  • OS: OS.X 10.11.4
  • Programming Language: python
  • CCXT version: 1.10.503
  • Exchange: cex
  • Method: exchange.load_markets()
import sys
import ccxt

def main(argv):
    global EXCHANGE

    if (len(argv) > 1):
        EXCHANGE = argv[1:]
    exchange = getattr(ccxt, EXCHANGE)({
        # 'verbose': True,
    })

    print("market id: {}".format(exchange.id))
    markets = exchange.load_markets()

if __name__ == '__main__':
    sys.exit(main(sys.argv))

Error: ccxt.base.errors.ExchangeNotAvailable: cex GET https://cex.io/api/currency_limits/ HTTPSConnectionPool(host=‘cex.io’, port=443): Max retries exceeded with url: /api/currency_limits/ (Caused by SSLError(SSLError(1, u’[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),))

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mmehrlecommented, Jan 9, 2018

Okay, problem solved and ignore the above. I was using one of PyCharms 2.7.10 virtual environments which I had a hard time upgrading. Linked it with a virtual env based on 2.7.13 which runs ssl 1.0.2l - works like a charm now.

1reaction
mmehrlecommented, Jan 9, 2018

Hey guys - sorry for being the bearer of bad news but I’m still getting the same error:

CCXT version: 1.10.614 market id: cex Traceback (most recent call last): File “/Users/xxx/crypto_dev/ccxt_query_exchange.py”, line 100, in <module> sys.exit(main(sys.argv)) File “/Users/xxx/crypto_dev/ccxt_query_exchange.py”, line 24, in main print_market_overview(argv) File “/Users/xxx/crypto_dev/ccxt_query_exchange.py”, line 35, in print_market_overview markets = exchange.load_markets() File “/Users/xxx/quant-2.7/lib/python2.7/site-packages/ccxt/base/exchange.py”, line 829, in load_markets markets = self.fetch_markets() File “/Users/xxx/quant-2.7/lib/python2.7/site-packages/ccxt/cex.py”, line 83, in fetch_markets markets = self.publicGetCurrencyLimits() File “/Users/xxx/quant-2.7/lib/python2.7/site-packages/ccxt/cex.py”, line 390, in request response = self.fetch2(path, api, method, params, headers, body) File “/Users/xxx/quant-2.7/lib/python2.7/site-packages/ccxt/base/exchange.py”, line 296, in fetch2 return self.fetch(request[‘url’], request[‘method’], request[‘headers’], request[‘body’]) File “/Users/xxx/quant-2.7/lib/python2.7/site-packages/ccxt/base/exchange.py”, line 355, in fetch self.raise_error(ExchangeNotAvailable, url, method, e) File “/Users/xxx/quant-2.7/lib/python2.7/site-packages/ccxt/base/exchange.py”, line 278, in raise_error details, ccxt.base.errors.ExchangeNotAvailable: cex GET https://cex.io/api/currency_limits/ HTTPSConnectionPool(host=‘cex.io’, port=443): Max retries exceeded with url: /api/currency_limits/ (Caused by SSLError(SSLError(1, u’[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),))

Read more comments on GitHub >

github_iconTop Results From Across the Web

TLSV1_ALERT_PROTOCOL_VE...
2.0 after doing some tests with 2.4.0, as evident a lot of cached stuff has been fetched earlier). $ pip --version pip 9.0.1...
Read more >
ssl.SSLError: tlsv1 alert protocol version - Stack Overflow
Background: I run a Python script on a Beaglebone Black that polls the cryptocurrency exchange Poloniex using the python-poloniex library. It ...
Read more >
https://docs.python.org/2/library/ssl.html
No information is available for this page.
Read more >
TLS/SSL and PyMongo - Read the Docs
Contact your operating system vendor for a solution or upgrade to a newer distribution. You can check your Python interpreter by installing the...
Read more >
TLS 1.0 and 1.1 encryption protocols will no longer be supported
December 5, 2018, 2:08pm #1 ... [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version ... python, django, python-2.7, ssl.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found