systamental / cryptodatapy

CryptoDataPy is a python library that makes it easy to build high quality data pipelines for the analysis of cryptoassets
Apache License 2.0
11 stars 4 forks source link

KeyError: 'CRYPTOCOMPARE_API_KEY' #12

Closed kopdaniil closed 3 months ago

kopdaniil commented 1 year ago

''' from cryptodatapy.extract.datarequest import DataRequest from cryptodatapy.extract.getdata import GetData data_req = DataRequest( source='coinmetrics',
tickers=['btc', 'eth'], fields=['close', 'add_act', 'hashrate'], req='d', start_date='2016-01-01')

GetData(data_req).get_series() '''

''' cryptocompare_api_key: str = os.environ['CRYPTOCOMPARE_API_KEY']


  File "<frozen os>", line 679, in __getitem__
KeyError: 'CRYPTOCOMPARE_API_KEY'
'''
nicklatin commented 3 months ago

Sorry for not responding earlier to this. Yes, you need to add your cryptocompare API key to your environment variables as 'CRYPTOCOMPARE_API_KEY'. This should take care of it.