Closed ksiau closed 2 years ago
Hello, Regarding proxies it doesn't need to be defined as an parameter. You can set your proxies after initializing CoinGeckoAPI() by using the session variable directly, and then call the API endpoints. For example:
>>> import pycoingecko
>>> cg=pycoingecko.CoinGeckoAPI()
>>> print(cg.session.proxies)
{}
# set up a proxy (or any other dictionary with proxies)
>>> cg.session.proxies['https']='http://10.10.1.10:1080'
>>> print(cg.session.proxies)
{'https': 'http://10.10.1.10:1080'}
# for example get price of bitcoin in USD
>>> cg.get_price(ids='bitcoin', vs_currencies='usd')
The version of urllib3 is important because the latest version 1.26 has a bug.