Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples from the README fail #72

Open
yurivict opened this issue Dec 25, 2022 · 0 comments
Open

Examples from the README fail #72

yurivict opened this issue Dec 25, 2022 · 0 comments

Comments

@yurivict
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant