Just wondering if anyone has been able to make a batch call to the iex cloud api requesting technical indicators like SMA10day or EMA10day for multiple tickers.
I have no problem accessing some of the other features via the following url: batch_api_call_url = f'https://cloud.iexapis.com/v1/stock/market/batch?&types=quote,stats,advanced-stats,company&symbols={tickers}&token={iex_token}'
However, the technical indicators endpoint eludes me. Any guidance is much appreciated!
In the long run if you know some Python it might be better to simply make a get request to the api for the price data and calculate the MAs internally. This way it doesnt eat into your cumulative end-point quotas.
data = requests.get(api_call_url).json() # get price data only from eixcloud data.index= pd.to_datetime(data.index) import talib as ta #you might need to install this resource first data['SMA20'] = ta.SMA(data.close, timeperiod = 20)
here is a further reference: https://mrjbq7.github.io/ta-lib/ or just df['20SMA'] = df['Close'].rolling(20).mean()