Forums

Error: requests.exceptions.ProxyError: HTTPSConnectionPool(host='pro-api.coinmarketcap.com', port=443)

i am beginner with python therefore i try to test to load data from pro-api.coinmartketcap.com.

i have a free API from coinmartket and when i execuse this Link on chrome browser, i get json data

https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?start=1&limit=5000&convert=USD&CMC_PRO_API_KEY=xxxx

but when i execuse my query on pycharm,it get Error: requests.exceptions.ProxyError: HTTPSConnectionPool(host='pro-api.coinmarketcap.com', port=443)

Did i do something wrong?

Thankyou very much

import requests
import json
import pathlib


solditems = requests.get('https://pro-            
api.coinmarketcap.com/v1/cryptocurrency/listings/latest? 
start=1&limit=5000&convert=USD&CMC_PRO_API_KEY=xxx')

data = solditems.json()
with open('data.json', 'w') as f:
json.dump(data, f)

enter image description here

enter image description here

These are the forums for PythonAnywhere, an online Python development and hosting environment. While other users of our site might be able to help you out with problems you're having developing something on your own machine, you might have better luck getting an answer to a general programming problem at a programming Q&A site like Stack Overflow.