I am deciding whether I should go for Eikon API.
Basically we would like to obtain the 5minute/3minute/1day MACD (moving average) chart data programatically on request basis.
Is Eikon API feasible to do that?
Thanks very much.
@Juno Chan there are no pre-calculated intraday MACD values, and the pre-calc ones are a snapshot, rather than time series:
import pandas as pd import eikon as tr tr.set_app_id('your_eikon_id') aapl_daily_macd, err = tr.get_data(['AAPL.O'], ['TR.MovAvgCDLine1.date','TR.MovAvgCDLine1','TR.MovAvgCDLine2','TR.MovAvgCDSignal']) aapl_daily_macd
As for the intraday, you can calculate it with the standard pandas tools, as get_timeseries() returns a pandas.Dataframe. The intervals that are supported are 'tick', 'minute', 'hour', 'daily', 'weekly', 'monthly', 'quarterly', 'yearly'.
aapl_1_min = tr.get_timeseries(['AAPL.O'], ['TIMESTAMP', 'CLOSE'],interval='minute', start_date='2018-02-01', end_date='2018-02-02') aapl_1_min_ewm_fast = aapl_5_min.ewm(span=12, min_periods=1).mean() aapl_1_min_ewm_slow = aapl_5_min.ewm(span=26, min_periods=1).mean() aapl_1_min_macd = pd.DataFrame(aapl_1_min_ewm_fast-aapl_1_min_ewm_slow)
You can resample 1 min series to get 3 and 5 mins with pandas.Series.resample().
On the other hand, also seeing there is a .NET version of Eikon API getting time series of 1minute/30minute/daily. Could the 1minute intraday also be resampled to 5minute interval?
Just would like to compare the implementations between both .net and python.