alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 374 forks source link

Example from the docs fails #620

Open yurivict opened 1 year ago

yurivict commented 1 year ago

This code:

import investpy

df = investpy.get_stock_historical_data(stock='AAPL',
                                        country='United States',
                                        from_date='01/01/2010',
                                        to_date='01/01/2020')
print(df.head())

fails:

Traceback (most recent call last):
  File "/usr/ports/finance/py-investpy/x.py", line 3, in <module>
    df = investpy.get_stock_historical_data(stock='AAPL',
  File "/usr/local/lib/python3.9/site-packages/investpy/stocks.py", line 664, in get_stock_historical_data
    raise ConnectionError(
ConnectionError: ERR#0015: error 403, try again later.