Eikon API for MACD(Moving Average) chart data
Hi Team,
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.
Cheers,
Juno
Best Answer
-
@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_macdAs 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().
0
Answers
-
Thanks @Zhenya Kovalyov for the python implementation. Is this based on the "Eikon API Proxy Beta"?
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.
Cheers,
Juno
0 -
You can resample any 1-min or tick data into any evenly spaced interval, it is simpler in python in my opinion, as the tool set for working with data is much reacher with the pandas data frame, however there is a bunch of examples how to do it in .net as well (for example, this). I would use python, as it also has access to the fundamental data API, something that the legacy .NET API will not get.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛