0

Not too sure why I'm getting this error, I've tried searching for solutions however all have failed. If anyone could assist me, it would be great.

Error; HTTPSConnectionPool(host='min-api.cryptocompare.com', port=443): Max retries exceeded with url: /data/pricemultifull?fsyms=BTC&tsyms=USD (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

import requests 

apiurl = 'https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC&tsyms=USD'

r = requests.get(apiurl)
print(r.json)

num3ri
  • 822
  • 16
  • 20
Jack
  • 5
  • 4
  • What's the result of `print(requests.get('https://python.org').text[:200])` – Waket Zheng Apr 01 '19 at 10:53
  • 1
    "I've tried searching for solutions however all have failed" - So you've [installed the openssl module](https://stackoverflow.com/a/54211170/243245), and you're not using [an old Python 3.7.1](https://github.com/AnacondaRecipes/python-feedstock/issues/13) from Anaconda? And you're still getting the error? – Rup Apr 01 '19 at 10:55
  • Version;Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 edit; had two seperate installs of python, used wrong version. my mistake. rupert – Jack Apr 01 '19 at 11:24

1 Answers1

0

I Tried this:

import requests  
apiurl = 'https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC&tsyms=USD' 

r = requests.get(apiurl) 
print(r.json()) 

And I get the following output

{'RAW': {'BTC': {'USD': {'TYPE': '5', 'MARKET': 'CCCAGG', 'FROMSYMBOL': 'BTC', 'TOSYMBOL': 'USD', 'FLAGS': '2', 'PRICE': 4130.95, 'LASTUPDATE': 1554115944, 'LASTVOLUME': 0.28487923, 'LASTVOLUMETO': 1170.2610865016, 'LASTTRADEID': '15541159439900460000', 'VOLUMEDAY': 18479.44300860692, 'VOLUMEDAYTO': 76325046.14648715, 'VOLUME24HOUR': 26270.17398139309, 'VOLUME24HOURTO': 108384093.59153283, 'OPENDAY': 4112.79, 'HIGHDAY': 4147.4, 'LOWDAY': 4082.2, 'OPEN24HOUR': 4108.58, 'HIGH24HOUR': 4155.27, 'LOW24HOUR': 4071.17, 'LASTMARKET': 'Bitlish', 'VOLUMEHOUR': 896.750348464797, 'VOLUMEHOURTO': 3701972.402759318, 'OPENHOUR': 4138.59, 'HIGHHOUR': 4141.98, 'LOWHOUR': 4130.29, 'CHANGE24HOUR': 22.36999999999989, 'CHANGEPCT24HOUR': 0.5444703522871622, 'CHANGEDAY': 18.159999999999854, 'CHANGEPCTDAY': 0.4415494104974933, 'SUPPLY': 17620525, 'MKTCAP': 72789507748.75, 'TOTALVOLUME24H': 319890.30644538533, 'TOTALVOLUME24HTO': 1321314179.7936616, 'IMAGEURL': '/media/19633/btc.png'}}}, 'DISPLAY': {'BTC': {'USD': {'FROMSYMBOL': 'Ƀ', 'TOSYMBOL': '$', 'MARKET': 'CryptoCompare Index', 'PRICE': '$ 4,130.95', 'LASTUPDATE': 'Just now', 'LASTVOLUME': 'Ƀ 0.2849', 'LASTVOLUMETO': '$ 1,170.26', 'LASTTRADEID': '15541159439900460000', 'VOLUMEDAY': 'Ƀ 18,479.4', 'VOLUMEDAYTO': '$ 76,325,046.1', 'VOLUME24HOUR': 'Ƀ 26,270.2', 'VOLUME24HOURTO': '$ 108,384,093.6', 'OPENDAY': '$ 4,112.79', 'HIGHDAY': '$ 4,147.40', 'LOWDAY': '$ 4,082.20', 'OPEN24HOUR': '$ 4,108.58', 'HIGH24HOUR': '$ 4,155.27', 'LOW24HOUR': '$ 4,071.17', 'LASTMARKET': 'Bitlish', 'VOLUMEHOUR': 'Ƀ 896.75', 'VOLUMEHOURTO': '$ 3,701,972.4', 'OPENHOUR': '$ 4,138.59', 'HIGHHOUR': '$ 4,141.98', 'LOWHOUR': '$ 4,130.29', 'CHANGE24HOUR': '$ 22.37', 'CHANGEPCT24HOUR': '0.54', 'CHANGEDAY': '$ 18.16', 'CHANGEPCTDAY': '0.44', 'SUPPLY': 'Ƀ 17,620,525.0', 'MKTCAP': '$ 72.79 B', 'TOTALVOLUME24H': 'Ƀ 319.89 K', 'TOTALVOLUME24HTO': '$ 1,321.31 M', 'IMAGEURL': '/media/19633/btc.png'}}}}
nidabdella
  • 811
  • 8
  • 24
  • 1
    I don't think OP's issue is the missing brackets on `r.json()` - he isn't getting that far. – Rup Apr 01 '19 at 10:56