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 romerson.gadil21 · Sep 11, 2020 at 09:42 AM · pythoneikoneikon data apieikondataapiindex constituents

Constituent list and weight for .SPX using Python API

Raising this query in behalf of the external client Giang Le (User ID giang.le@tgm-au.com) from Tactical Global Management Ltd. He is seeking assistance on how to retrieve constituent list and weight for .SPX using Python API

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 jason.ramchandani · Sep 11, 2020 at 09:56 AM

@romerson.gadil21 please see the code below:

For current constituents/weightings:

df, err = ek.get_data('0#.SPX', ['TR.IndexConstituentWeightPercent.date','TR.IndexConstituentWeightPercent'])
df

For historical constituents/weightings you need to add a Sdate parameter:

df, err = ek.get_data('0#.SPX', ['TR.IndexConstituentWeightPercent.date','TR.IndexConstituentWeightPercent'],{'Sdate':'2020-03-12'})   
df

I hope this can help. NB Historical constituents are not available for all indices.


1599818106043.png (108.9 KiB)
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
romerson.gadil21 · Sep 11, 2020 at 10:27 AM 0
Share

Thank you Jayson. My apologies. I missed to add. The client only has delayed access for this RIC. Would it matter?

avatar image
REFINITIV
jason.ramchandani ♦♦ · Sep 11, 2020 at 10:31 AM 0
Share

@romerson.gadil21 I'm not sure - I don't think it should matter as the information is coming from a non-realtime source. Ask the client to try it and see.

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

Python Time Series - Convert Date Index to Pandas Column

Eikon Python API Empty Response for Private Company Financial Data - e.g. TR.Revenue, TR.GrossProfit

Can I change the row header with the 'Rh' parameter using the Eikon Data API?

TR formula to get Market Classification by Market.

How to find field names in Eikon Python API?

  • 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