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 greg.tyng · Dec 30, 2020 at 04:55 PM · python apiget_dataget_timeseriesricscommodity futures

Python code to retrieve historical point in time daily futures curve (replicate Eikon for Excel below)

Python code to create this dataframe starting with row 10 (skip row 11)

1609347158257.png (65.0 KiB)

People who like this

0 Show 1
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.

avatar image
greg.tyng · Dec 30, 2020 at 06:49 PM 0
Share

For some reason the output does not match the date range?

1609354216384.png (12.7 KiB)

1 Reply

  • Sort: 
avatar image
Best Answer
Answer by greg.tyng · Dec 30, 2020 at 05:59 PM

This one works...

contract = 'DCSc'

riclist = ["{}{}".format(contract, i) for i in range(1,13,1)]
print(riclist)

df = ek.get_timeseries(riclist,'close',
start_date='20140101',
end_date='20190401', interval='daily')

df.reset_index('Date', inplace=True)


df['Date'] = df['Date'].dt.strftime('%Y%m%d')
print(df)

Comment

People who like this

0 Show 0 · 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.

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 >
10 People are following this question.

Related Questions

get_timeseries `No data available for the requested date range` and other problems

How to properly download expired commodity futures data

Different values returned by get_timeseries and get_data

Missing dates for get_timeseries and no VWAP data for German stocks

Eikon Python API: No negative values via get_data / get_timeseries

  • 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