alvarobartt / investiny

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

Not working for bonds #11

Closed OGsiji closed 1 year ago

OGsiji commented 1 year ago
from investiny import historical_data, search_assets

search_results = search_assets(query='U.K. 10Y', limit=1, type="bond")
investing_id = int(search_results[0]["ticker"])

list index out of range

alvarobartt commented 1 year ago

Hi @OGsiji so the filter is named "Bond Yield" not "bond", but besides that, I've tried it and it doesn't work with the filter indeed, so you can remove the filter in the meantime so as to get the results 😄

alvarobartt commented 1 year ago

Hi again @OGsiji already found the fix, just rename the filter="bond" to filter="Yield". Anyway I'll release the changes ASAP 😄

OGsiji commented 1 year ago

Make sense, Thanks