Closed mrkgoh closed 3 years ago
Hi @mrkgoh thank you for reporting it! 👍🏻 This is a common issue as the static files are not updated, but in the meantime, you can use the investpy.search_quotes()
function instead, I think that you can retrieve the results you are looking for like explained in: https://github.com/alvarobartt/investpy/wiki/investpy.search_quotes()
Hope this is useful to you!
Hi @alvarobartt , thank you for your prompt response.
I have tried your suggested method and it seems that 'malaysia' as a country is not supported yet under investpy.stock_quotes(). Here is what I have tried:
import investpy search_results = investpy.search_quotes(text='hong leong', products=['stocks'], countries=['malaysia'], n_results=5)
Error I got :
ValueError Traceback (most recent call last)
Hmm, suspicious... So it seems that Malaysia is not listed among the Investing.com country filters... Let me check and get back to you with a response! :detective:
@alvarobartt the module is working fine for most Malaysia stocks only a few stocks are experiencing this bug
Sure, I guess that the error is just happening whenever you are using investpy.search_quotes()
, right?
Hi @mrkgoh, I've just updated the list of countries in https://github.com/alvarobartt/investpy/commit/26a61cafa9302ecc4eeffa6bf72fc5a0cd8c8ff8 with the script available at scripts/search_filters.ipynb!
I'm planning to include all the scripts so that any user can generate/update any of the static values, in order to improve the update frequency so that the users don't need to highly rely on investpy.search_quotes()
:hugs:
Feel free to install the latest version from the master
branch and check that investpy.search_quotes()
works as expected for all the financial products available in Malaysia!
pip install git+https://github.com/alvarobartt/investpy.git@master
If you run : ip_df = investpy.get_stocks(country='malaysia')
The following stock is missing from the list. ISIN: MY5274 Hong Leong Capital Berhad
If you check investing.com the stock exists in https://www.investing.com/equities/hong-leong-capital-bhd