Open slevin48 opened 9 months ago
Alpha Vantage standard API rate limit is 25 requests per day
Retrieve stock by ISIN https://investpy.readthedocs.io/
import investpy
df = investpy.stocks.search_stocks(by='isin', value='US0126531013')
print(df)
# country name full_name isin currency symbol
# 0 mexico Albemarle Albemarle Corp US0126531013 MXN ALB
# 1 united states Albemarle Albemarle Corp US0126531013 USD ALB
# 2 germany Albemarle Albemarle Corporation US0126531013 EUR ALLE
from pandas_datareader import data as pdr
symbol = df.loc[df['country']=='united states','symbol'].values[0]
print(symbol) # ALB
stock = pdr.DataReader(symbol, data_source="yahoo", start="2021-01-01", end="2021-10-30")
print(stock.head())
line 40