alvarobartt / investiny

🤏🏻 `investpy` but made tiny
https://alvarobartt.github.io/investiny
MIT License
301 stars 36 forks source link

Examples from the README fail #72

Open yurivict opened 1 year ago

yurivict commented 1 year ago

This code:

from investiny import historical_data
data = historical_data(investing_id=6408, from_date="09/01/2022", to_date="10/01/2022") # Returns AAPL historical data as JSON (without date)
print(data)

fails:

Traceback (most recent call last):
  File "/usr/ports/finance/py-investiny/x.py", line 6, in <module>
    data = historical_data(investing_id=6408, from_date="09/01/2022", to_date="10/01/2022") # Returns AAPL historical data as JSON (without date)
  File "/usr/local/lib/python3.9/site-packages/investiny/historical.py", line 48, in historical_data
    info = investing_info(investing_id=investing_id)
  File "/usr/local/lib/python3.9/site-packages/investiny/info.py", line 41, in investing_info
    return request_to_investing(  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/investiny/utils.py", line 36, in request_to_investing
    raise ConnectionError(
ConnectionError: Request to Investing.com API failed with error code: 403.