alvarobartt / investpy

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

ERROR 403 when getting currency cross historical data #604

Open hscho77 opened 1 year ago

hscho77 commented 1 year ago

As I know, both get_stock_recent_data and get_stock_historical_data are fixed. But "get_currency_cross_historical_data" has same issue still.

import investpy

yesterday = '19/07/2022'
today = '20/07/2022'

fx_df = investpy.get_currency_cross_historical_data(currency_cross='USD/KRW', from_date=yesterday, to_date=today)
print(fx_df)
  File "D:\Anaconda3\lib\site-packages\investpy\currency_crosses.py", line 674, in get_currency_cross_historical_data
    raise ConnectionError(
ConnectionError: ERR#0015: error 403, try again later.
chanhw3 commented 1 year ago

Me 2, there is 403 error after running the sample code import investpy df = investpy.get_stock_historical_data(stock='AAPL', country='United States', from_date='01/01/2010', to_date='01/01/2020')

code below

line 665, in get_stock_historical_data "ERR#0015: error " + str(req.status_code) + ", try again later." ConnectionError: ERR#0015: error 403, try again later.

vincentli2017 commented 1 year ago

This is a known issue, there is not a fix to it yet.

arexms commented 1 year ago

Same issue. Looks like investing.com changed something on their side.' "Enable JavaScript and cookies to continue"

Response from investing.com (part of it) `

Checking if the site connection is secure

`
alvarobartt commented 1 year ago

So I've already contacted Investing.com and started a conversation there, I'll let you all know the outcome of it. Thanks for your patience! :hugs:

iazkarategi commented 1 year ago

Have you any new? Thanks a lot

alvarobartt commented 1 year ago

Not yet @iazkarategi, I'll let you know whenever they answer me, but let's put too much faith in it, as investpy is not an official Investing.com product...

PrinceMalaba commented 1 year ago

Not yet @iazkarategi, I'll let you know whenever they answer me, but let's put too much faith in it, as investpy is not an official Investing.com product...

Any Luck on solution to 403 error?

alvarobartt commented 1 year ago

Yes @PrinceMalaba I found a solution that I've developed in investiny usage is limited, but it works fine. And, I've just released investiny v0.3.0 with search_assets function to mimic investpy.search_quotes function which is not working here either.

💫 So please everyone go install investiny, star it to show me some support, provide me feedback, open issues, etc.