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 peng.tian · Aug 09, 2018 at 01:53 PM · 2018

TR(Universe=’0#USTSY’)

I want to translate a excel function TR(Universe=’0#USTSY’) in python. How should I do it?

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.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Aug 09, 2018 at 05:59 PM

There appears to be an error in the Excel function syntax you provided. Assuming what you're looking to do is to retrieve the constituents of 0#USTSY= chain, which is what =TR("0#USTSY=") function returns, then you can use for instance

ek.get_data('0#USTSY=',['DSPLY_NAME'])

The field name DSPLY_NAME in the above is arbitrary. It can be replaced or appended by any other field available in the real-time record for the constituents of 0#USTSY= chain, e.g.

ek.get_data('0#USTSY=',['DSPLY_NAME','PRIMACT_1','SEC_ACT_1'])
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
peng.tian · Aug 09, 2018 at 06:13 PM 0
Share

Thanks. It is very helpful. The output instrument ticker is same as ID_CUSIP from Bloomberg, right? Can I get corresponding Bloomberg ticker and following Bloomberg field: SECURITY_DES, SECURITY_PRICING_DATE, MATURITY, ID_BB_UNIQUE, ID_BB_GLOBAL, MARKET_SECTOR_DES?

Besides, how can I find tickers to get other countries' bonds, i.e. German, France, British, Canada, Italy and Japan?

Thanks

Peng

avatar image
REFINITIV
Answer by Alex Putkov. · Aug 09, 2018 at 07:15 PM

Hi Peng,
The symbols returned in the Instrument column are RICs, which is Thomson Reuters proprietary symbology. There's no direct mapping between RICs and Bloomberg symbols, however you could use other symbology such as ISINs, Cusips, Sedols etc as intermediary. E.g. using Eikon you can retrieve a Cusip given a RIC and vice versa. And using Bloomberg terminal you can retrieve Bloomberg symbols given a Cusip and vice versa.
It sounds like you could benefit from an introductory training for Eikon focusing no how to find the data items you might be interested in. You can request such training through your Thomson Reuters account team or from the main Eikon menu - Help - Tutorials and Training - Live Training.
Also please note that my answers are specific to Eikon and Eikon APIs. I understand your company is also considering using Datascope product. The calls to retrieve data from Datascope will be different. If you're looking to use Datascope, please visit Datascope page on this portal:
https://developers.thomsonreuters.com/datascope-select-dss

And if you have questions related to Datascope APIs you can post them on a dedicated forum.

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.

avatar image
Answer by peng.tian · Aug 10, 2018 at 09:19 AM

Thanks. I tried the following

ek.get_data('0#USTSY=',['DSPLY_NAME', 'CUSIP'])

but can't get CUSIP. Anything wrong?

Peng

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
REFINITIV
Alex Putkov. ♦♦ · Aug 10, 2018 at 10:45 AM 0
Share

It sounds like you're trying to guess the field name. If this is indeed what you're doing you're unlikely to succeed. The best way to discover the field names you can use in function calls is to search for them using the GUI helpers provided in the product. See this tutorial, which talks at length about metadata discovery.
For US treasuries the RIC symbology is based on CUSIP. You could simply drop the trailing "=" sign from the RIC such as "912810RY6=" to arrive at the CUSIP. The exception are the RICs denoting "when issued" benchmarks.

avatar image
REFINITIV
Alex Putkov. ♦♦ · Aug 10, 2018 at 10:50 AM 0
Share

Alternatively you can retrieve CUSIPs for the constituents of 0#USTSY= chain using the following sample:

df, err = ek.get_data('0#USTSY=',['DSPLY_NAME'])
ustlist = df['Instrument'].tolist()
ek.get_data(ustlist,['TR.CUSIP'])
avatar image
Answer by peng.tian · Aug 10, 2018 at 10:52 AM

Thanks a lot. Appreciated!

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