Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by chen.lin · Dec 12, 2019 at 12:15 PM · eikonget_dataeikondataapi

Efficient retrieval of a series of returns data around a date

Hi, my question is about what is an efficiency way of doing this:

Let's say I have a particular date of interest for a RIC, and I want to get 1) the daily total returns for -1 to 1 days around this date and 2) the total return from this date to 30 days after this date.

For now I am retrieving every return data separately by

#for the daily return from -1 to 0
=eikon.get_data([RIC,['TR.TotalReturn'], {'SDate':datetime.strftime(Date - timedelta(1), '%Y-%m-%d'), 'EDate':datetime.strftime(Date - timedelta(0), '%Y-%m-%d')})

This appears very inefficient when I have many of such dates of interest from many RICs, not to mention the Error 400 warnings. Just wonder if anyone have a clever way?



People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit.jintamalit · Dec 30, 2019 at 03:55 AM

Hi @chen.lin

First, I would like to mention that get_data can take in multiple RICs as input. This may reduce your API call if you only pass in a single RIC.

Second, It really depends on the dates of your interest. So you can consider retrieving a range of data and filter them out on your dataframe.

Just make sure that it does not exceed the limitation which explained here.


Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
chen.lin · Jan 08, 2020 at 08:58 AM 0
Share

Hi, many thanks, that's exactly what I tried later on and it worked nicely for my tasks :)


However, there's one minor bug I want to report and an additional question about the limits.

For some RICs, I get duplicated observations, as in the example below:

data_grid, err = eikon.get_data('1992.T',
                                fields = ['TR.TotalReturn1D.date','TR.TotalReturn1D'],
                                parameters={'SDate':'1991-09-01','EDate':'2019-12-01','Frq':'D','CH':'Fd'})


You can immediately spot them

It's not hard to fix this once you are aware, but might be a problem if someone else does not. And it seems this is not an issue when I run the formula in excel add-in.


And just of curiosity, for that same code, I tried to used up to 20 RICs as input and obtained a matrix of size 113,852 X 3. How is that not restricted by the limit of 10,000 data point?



capture.jpg (79.8 KiB)
avatar image
REFINITIV
chavalit.jintamalit ♦♦ chen.lin · Jan 08, 2020 at 09:27 AM 1
Share

Hi @chen.lin

I tried using Eikon Excel to retrieve the same RIC and date range data.

I can see the same identical data.

So this should be a content issue.

Refinitiv Helpdesk can help to clarify if there is any content issue or can explain why you get duplicated records.

You can raise query to them at https://my.refinitiv.com/

ahs.png (50.4 KiB)

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

How to find field names in Eikon Python API?

Set Python API logs programmatically.

Cause of large disparities between Eikon Volume and Volume from other sources?

eikon data api passing parameter

Eikon upcoming upgrade notifications

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges