How to get in C# the same data as in Python with eikon.get_timeseries
Hello,
It seems that historical data from some RICs are different when extracted through the Eikon Terminal Instrument Explorer, vs Excel Add-in, vs the Python eikon API, when I would expect them to be the same.
What is the exact C# code which I need to use to get the exact same data which is outputted by the Python code below?
import eikon as ek
ek.get_timeseries(['GFRUKBWE1'], ['Value'], start_date=None, end_date=None, interval='tick', count=1000000)
Thank you
Best Answer
-
The data retrieved by Eikon Data API .NET is similar to the data retrieved by the Python library.
You may need to contact the content support team directly via MyRefinitiv to clarify it.
0
Answers
-
0
-
It seems that there is a function in C# which seems equivalent to python: eikon.GetTimeSeries() - see first snapshot.
One issue I have found is that the data seems to be duplicated at a very short time intervals - see second snapshot. What could be causing those artefacts?
0 -
We are now using the newer EikonDataApi for C# but the python output seems to be doubling up the results.
Python code is here:
# coding: utf-8__version__ = "1.1.14"
""" Eikon Data API for Python allows your Python applications to access Refinitiv data directly from Eikon. Its usage requires: - An App Key (you can create it wit App Key Generator in Eikon Desktop) - Eikon Desktop or Refinitiv Workspace application running on your local machine
"""
from .Profile import *from .symbology import get_symbologyfrom .json_requests import send_json_requestfrom .news_request import get_news_headlines, get_news_storyfrom .time_series import get_timeseriesfrom .data_grid import get_data, TR_Fieldfrom .eikonError import EikonErrorfrom .streaming_session import *
dfT = ek.get_timeseries(r, ['Value', 'Volume'], start_date=dS, end_date=dE, interval='tick', count=1000000) #Market Orders (Best B/A): when each trade happensPython result example for RIC GFRUKBWE1
2021-12-02 13:05:11.717000+00002072021-12-02 13:05:11.758000+00002072021-12-02 13:05:11.814000+00002072021-12-02 13:05:11.859000+00002072021-12-03 07:56:29.808000+00002022021-12-03 07:56:29.854000+00002022021-12-03 07:56:30.048000+00002022021-12-03 07:56:30.094000+00002022021-12-10 08:04:30.566000+00002142021-12-10 08:04:30.840000+00002142021-12-10 08:08:34.596000+0000216.52021-12-10 08:08:34.749000+0000216.52021-12-10 08:37:55.355000+00002142021-12-10 08:37:55.565000+00002142021-12-13 10:31:29.978000+00002652021-12-13 10:31:30.024000+00002652021-12-13 10:31:30.198000+00002652021-12-13 10:31:30.248000+00002652021-12-13 16:29:28.807000+00002672021-12-13 16:29:28.853000+00002672021-12-13 16:29:29.147000+00002672021-12-13 16:29:29.196000+0000267C#
EikonDataApi 0.4.7
Using 4.7.2 Framework
IEikon eikon = Eikon.CreateDataAPI();
eikon.SetAppKey(xxx);
var data = eikon.GetTimeSeries(
"GFRUKBWE1", //a single RIC to retrieve historical data for
new DateTime(2021, 12, 1), //starting date of the historical range
new DateTime(2021, 12, 17) //end date of the historical range
, Interval.tick);
C# Result:
VOLUME->GFRUKBWE102-Dec-2113:05:11207<missing>->GFRUKBWE102-Dec-2113:05:11207<missing>->GFRUKBWE103-Dec-2107:56:29202<missing>->GFRUKBWE103-Dec-2107:56:30202<missing>->GFRUKBWE110-Dec-2108:04:30214<missing>->GFRUKBWE110-Dec-2108:04:30214<missing>->GFRUKBWE110-Dec-2108:08:34216.5<missing>->GFRUKBWE110-Dec-2108:08:34216.5<missing>->GFRUKBWE110-Dec-2108:37:55214<missing>->GFRUKBWE110-Dec-2108:37:55214<missing>->GFRUKBWE113-Dec-2110:31:29265<missing>->GFRUKBWE113-Dec-2110:31:30265<missing>->GFRUKBWE113-Dec-2116:29:28267<missing>->GFRUKBWE113-Dec-2116:29:29267<missing>->GFRUKBWE116-Dec-2111:58:49295<missing>->GFRUKBWE116-Dec-2111:58:49295<missing>->GFRUKBWE116-Dec-2113:28:35305<missing>->GFRUKBWE116-Dec-2113:28:35305<missing>0 -
Might be easier to read: Python version is has 2 of the same outputs with slightly different timestamps
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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛