You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! Could you explain how to get investing_id by the ticker? For example, how to get the historical data of GOOGL in NASDAQ exchange from 09/01/2022 to 10/01/2022?
The text was updated successfully, but these errors were encountered:
frompathlibimportPathimportpandasaspdimportinvestpyimportinvestingpath=Path(investpy.__path__[0])
path=path/"resources"/"stocks.csv"# Could be any file listed under "investpy/resources/*.csv"df=pd.read_csv(path)
investing_id=df.loc[df["symbol"] =="GOOGL") & (df["country"] =="united states")].id.values[0]
data=investiny.historical_data(investing_id=investing_id, from_date="09/01/2022", to_date="10/01/2022")
print(data)
Manually through Investing.com
Go to Investing.com and look for the asset that you want e.g. GOOGL at https://www.investing.com/equities/google-inc
Open your Web Browser's inspect tool so as to check the Network
Navigate to the "Historical Data" tab there, or just add historical-data to the URL e.g. GOOGL at https://www.investing.com/equities/google-inc-historical-data
Filter the network traffic to just see api.investing.com queries
Once filtered, you just need to look for the ID which is part of the https://api.investing.com/api/financialdata/historical/<INVESTING_ID> endpoint
FYI I'm planning to add a function to automatically retrieve those using investiny, I'm just exploring different options so as to see which is the best way possible.
Also remember to share this with others if interested, and to star the repository. Thanks for your patience! 🤗
Hi there! Could you explain how to get
investing_id
by the ticker? For example, how to get the historical data of GOOGL in NASDAQ exchange from 09/01/2022 to 10/01/2022?The text was updated successfully, but these errors were encountered: