investpy
investpy copied to clipboard
ConnectionError: ERR#0015: error 429, try again later.
using investpy.get_commodity_historical_data
I wrote the tessa package to help with issues such as these. See here: https://github.com/alvarobartt/investpy/issues/557
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?
"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")
How long is the timeout for?
1 second – it's set here: https://github.com/ymyke/tessa/blob/master/tessa/rate_limiter.py
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
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.
using VPN works thank you
Evet bu hata ülkenin sınırlamasıyla ilgili. VPN kullandığımız zaman problem ortadan kalkıyor.