alvarobartt / investpy

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

Change of get_fund_historical_data arguments #474

Open ghost opened 2 years ago

ghost commented 2 years ago

I think the function get_fund_historical_data should use the ISIN number of a mutual fund than its name to download historical prices. This would be much more consistent and less error-prone as Fund names might not exactly match across different sources that people might be using.

So from

investpy.get_fund_historical_data(fund= fund_name,
                                       country   = country,
                                       from_date = from_date,
                                       to_date   = to_date)

I would have changed the function to something like:

investpy.get_fund_historical_data(fund_isin = isin_ticker,
                                       country   = country,
                                       from_date = from_date,
                                       to_date   = to_date)

For example, in order to do my job l have to run all the time a search over the ISIN of the mutual funds to get their names using the investpy.get_funds(country=None). Would have been simpler and easier to use the function for downloading historical prices if this function allowed to pass the ISIN number of the mutual funds instead of their names.