investpy icon indicating copy to clipboard operation
investpy copied to clipboard

ConnectionError: ERR#0015: error 429, try again later.

Open af20 opened this issue 2 years ago • 9 comments

using investpy.get_commodity_historical_data

af20 avatar Mar 13 '22 10:03 af20

I wrote the tessa package to help with issues such as these. See here: https://github.com/alvarobartt/investpy/issues/557

ymyke avatar Apr 30 '22 08:04 ymyke

But tessa does not support commodities.

df, currency = price_history(query="Crude Oil WTI", type_="commodities") ===> ValueError: Unsupported asset type commodities.

How can I do?

af20 avatar May 05 '22 09:05 af20

"commodity" was missing as a type. I just published v0.2.0. If you update to that version of tessa, you should be able to do:

from tessa import price_history
df, currency = price_history(query="Crude Oil WTI", type_="commodity")

ymyke avatar May 06 '22 08:05 ymyke

How long is the timeout for?

wajihwajeh avatar Jun 23 '22 14:06 wajihwajeh

1 second – it's set here: https://github.com/ymyke/tessa/blob/master/tessa/rate_limiter.py

ymyke avatar Jun 23 '22 14:06 ymyke

I got this error using investpy and now I can't run any search through investpy without receiving that error and I get the same error trying to run it through tessa, however, this is only for currency crosses, I checked with stocks and the search on investpy goes through

wajihwajeh avatar Jun 23 '22 14:06 wajihwajeh

Maybe investing.com has separate rate limiting for each API endpoint. Either wait >24h and try again or use a VPN to change your IP address and then try again and see if the problem still occurs.

ymyke avatar Jun 23 '22 14:06 ymyke

using VPN works thank you

wajihwajeh avatar Jun 23 '22 15:06 wajihwajeh

Evet bu hata ülkenin sınırlamasıyla ilgili. VPN kullandığımız zaman problem ortadan kalkıyor.

ozgurcelen avatar Aug 21 '22 09:08 ozgurcelen