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 /

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by jokari69 · Oct 25, 2021 at 08:31 AM · historical

What is the best way to get a list of fields for a list of instruments for a historical date range with get_data?

Let's say I want to get around 500 fields for around 4000 instruments (stocks) for about 20 year (SDate = 2020-01-01). Given the multiple limits I cannot just use

get_date(instrument, fields, {'SDate': '2000-01-01', 'EDate': today_as_string}) 

as this will give all kinds of errors / limits breaching.

Currently I will chunk the instruments 50 at a time, select 1 field and query for the full date range.

dfs = []
for field in fields:
    for instruments_chunk in split_list(instruments, max_items_in_list=50): 
        df = ek.get_data(instruments_chunk, [field + 'date', field], {'SDate': '2000-01-01', 'EDate': today_as_string})
        df.rename(columns={df.columns[1]: 'date'}, inplace=True)
        df['date'] = pd.to_datetime(df['date']).dt.date.astype('datetime64')
        dfs.append(df)
final_df = pd.concat(dfs)

Although this works it is very slow and will take several days to complete.

Is there a better solution to this kind of problem?

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 Gurpreet · Oct 25, 2021 at 04:05 PM

@jokari69,

Eikon data api is not geared towards this kind of use. Refinitiv offers Datascope and Tickhistory products which can provide very granular data for a wide range of instruments. Please contact your Refinitiv account manager for getting access to these products.


Comment

People who like this

0 Show 1 · 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
jokari69 · Oct 26, 2021 at 08:50 AM 0
Share
Understood. Thank you for your detailed answer.

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 download historical Price to Book Value ratio, Market Cap, Market Returns and ESG Score for each of the companies of the MSCI World Index between 2016 and 2021 ?

Can I get point in time dividend data (available as of past date only at each point of time) using the python api?

US FED Rates

Is there an interval type 30 minutes for python api?

Historical investor turnover and fraction of shares traded

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges