Closed vpozdnyakov closed 1 year ago
Hi @vpozdnyakov, so currently there are 2 ways:
Via investpy
as it follows:
from pathlib import Path
import pandas as pd
import investpy
import investing
path = 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
https://www.investing.com/equities/google-inc
historical-data
to the URL e.g. GOOGL at https://www.investing.com/equities/google-inc-historical-data
api.investing.com
querieshttps://api.investing.com/api/financialdata/historical/<INVESTING_ID>
endpointFYI 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?