Code Monkey home page Code Monkey logo

cryptocurrency-analysis-python's People

Contributors

triestpa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptocurrency-analysis-python's Issues

HTTPError: HTTP Error 403: Forbidden

I tried with Github notebook, but encountered exception during the following step
altcoins = ['ETH','LTC','XRP','ETC','STR','DASH','SC','XMR','XEM'] altcoin_data = {} for altcoin in altcoins: coinpair = 'BTC_{}'.format(altcoin) crypto_price_df = get_crypto_data(coinpair) altcoin_data[altcoin] = crypto_price_df

but it works if I directly used in browser address bar
Downloading https://poloniex.com/public?command=returnChartData&currencyPair=BTC_ETH&start=1420050600.0&end=1512301259.544514&period=86400

FileNotFoundError Traceback (most recent call last)
in get_json_data(json_url, cache_path)
5 try:
----> 6 f = open(cache_path, 'rb')
7 df = pickle.load(f)
FileNotFoundError: [Errno 2] No such file or directory: 'BTC_ETH'
During handling of the above exception, another exception occurred:
HTTPError Traceback (most recent call last)
in ()
4 for altcoin in altcoins:
5 coinpair = 'BTC_{}'.format(altcoin)
----> 6 crypto_price_df = get_crypto_data(coinpair)
7 altcoin_data[altcoin] = crypto_price_df
in get_crypto_data(poloniex_pair)
9 print(json_url)
10 print(poloniex_pair)
---> 11 data_df = get_json_data(json_url, poloniex_pair)
12 data_df = data_df.set_index('date')
13 return data_df
in get_json_data(json_url, cache_path)
9 except (OSError, IOError) as e:
10 print('Downloading {}'.format(json_url))
---> 11 df = pd.read_json(json_url)
12 df.to_pickle(cache_path)
13 print('Cached response at {}'.format(json_url, cache_path))
~/anaconda3/envs/my_env36/lib/python3.6/site-packages/pandas/io/json/json.py in read_json(path_or_buf, orient, typ, dtype, convert_axes, convert_dates, keep_default_dates, numpy, precise_float, date_unit, encoding, lines, chunksize, compression)
350 compression = _infer_compression(path_or_buf, compression)
351 filepath_or_buffer, _, compression = get_filepath_or_buffer(
--> 352 path_or_buf, encoding=encoding, compression=compression,
353 )
354
~/anaconda3/envs/my_env36/lib/python3.6/site-packages/pandas/io/common.py in get_filepath_or_buffer(filepath_or_buffer, encoding, compression)
188
189 if _is_url(filepath_or_buffer):
--> 190 req = _urlopen(filepath_or_buffer)
191 content_encoding = req.headers.get('Content-Encoding', None)
192 if content_encoding == 'gzip':
~/anaconda3/envs/my_env36/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
221 else:
222 opener = _opener
--> 223 return opener.open(url, data, timeout)
224
225 def install_opener(opener):
~/anaconda3/envs/my_env36/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout)
530 for processor in self.process_response.get(protocol, []):
531 meth = getattr(processor, meth_name)
--> 532 response = meth(req, response)
533
534 return response
~/anaconda3/envs/my_env36/lib/python3.6/urllib/request.py in http_response(self, request, response)
640 if not (200 <= code < 300):
641 response = self.parent.error(
--> 642 'http', request, response, code, msg, hdrs)
643
644 return response
~/anaconda3/envs/my_env36/lib/python3.6/urllib/request.py in error(self, proto, *args)
568 if http_err:
569 args = (dict, 'default', 'http_error_default') + orig_args
--> 570 return self._call_chain(*args)
571
572 # XXX probably also want an abstract factory that knows when it makes
~/anaconda3/envs/my_env36/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
502 for handler in handlers:
503 func = getattr(handler, meth_name)
--> 504 result = func(*args)
505 if result is not None:
506 return result
~/anaconda3/envs/my_env36/lib/python3.6/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
648 class HTTPDefaultErrorHandler(BaseHandler):
649 def http_error_default(self, req, fp, code, msg, hdrs):
--> 650 raise HTTPError(req.full_url, code, msg, hdrs, fp)
651
652 class HTTPRedirectHandler(BaseHandler):

HTTPError: HTTP Error 403: Forbidden

What went wrong?

API KeyError

Hi, I have a question:

I've posted my Quandl API Key into this row:
quandl.ApiConfig.api_key = os.environ['API KEY']

File "C:***\Python\Github\Cryptocurrency Analysis\Cryptocurrency-Pricing-Analysis.py", line 74, in
quandl.ApiConfig.api_key = os.environ['API KEY']
File "C:\ProgramData\Miniconda3\lib\os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'API Key'
[Finished in 1.9s]

I'm working via Mininconda in Sublime Text. Using Jupyter doesn't work either. Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.