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 miriam.benito · May 30, 2019 at 09:37 AM · eikon apieikon data apiexcel apiscreener

Screener formula does not work in Eikon API

I am trying to use the same formula than Excel is retrieving me in Python and it is not working.

=TR("SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))/*UNV:Private*/), IN(TR.TRBCActivityCode,""5430102016""), IN(TR.HeadquartersRegion,""Europe""), BETWEEN(ZAV(TR.PCSmartRatiosLiquidityGlobalRank), 1.00, 20.00), CURN=USD)","TR.CommonName;TR.TRBCActivity"&";TR.HeadquartersRegion;ZAV(TR.PCSmartRatiosLiquidityGlobalRank)","curn=USD RH=In CH=Fd")



captura-de-pantalla-2019-05-30-a-las-153423.png (418.6 KiB)

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.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Gurpreet · May 30, 2019 at 01:27 PM

Hi @miriam.benito, Can you try this and see if it works for you:

exp = "SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))), IN(TR.TRBCActivityCode,""5430102016""), IN(TR.HeadquartersRegion,""Europe""), BETWEEN(ZAV(TR.PCSmartRatiosLiquidityGlobalRank), 1.00, 20.00), CURN=USD)" fields = ['TR.COmmonName', 'TR.TRBCActivity', 'TR.HeadquartersRegion', 'ZAV(TR.PCSmartRatiosLiquidityGlobalRank)'] 

df, e = ek.get_data(exp, fields)

print(df)

Here is my output:

     Instrument  ... ZAV(TR.PCSmartRatiosLiquidityGlobalRank)
0 4298157373 ... 9
1 4298203137 ... 18
2 4298232673 ... 14
3 4298253815 ... 14
4 4298266156 ... 14
5 4298270206 ... 3
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
miriam.benito · May 31, 2019 at 06:20 AM 0
Share

Hi @Gurpreet.

I do not know why I cannot run the same command...

captura-de-pantalla-2019-05-31-a-las-121849.png (217.7 KiB)
avatar image
REFINITIV
Answer by Gurpreet · May 30, 2019 at 10:01 AM

@miriam.benito Can you post your instrument list and complete script. I tried it with few instruments and the formula worked ok.

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
miriam.benito · May 30, 2019 at 10:27 AM 0
Share

@Gurpreet. Thanks for your response. I think that the question is wrongly posed. I wanted to retrieve the private companies of the activity with the code 5430102016 (Food markets) with those filters. There is no more than 5000 companies with those filters (already checked it via Screener), hence, I do not have the instrument list I want that list :)

The code is:

exp = "SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))/*UNV:Private*/), IN(TR.TRBCActivityCode,""5430102016""), IN(TR.HeadquartersRegion,""Europe""), BETWEEN(ZAV(TR.PCSmartRatiosLiquidityGlobalRank), 1.00, 20.00), CURN=USD)"

ek.get_data(instruments=[exp], fields=["TR.CommonName","TR.TRBCActivity","TR.HeadquartersRegion","TR.PCSmartRatiosLiquidityGlobalRank"])

Thanks a lot!

avatar image
REFINITIV
Answer by Gurpreet · May 31, 2019 at 09:23 AM

Hi @miriam.benito Can you please confirm that you are using the latest version of Eikon API ?

>>> import eikon as ek
>>> ek.__version__
'1.0.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
miriam.benito · Jun 01, 2019 at 05:27 AM 0
Share

Hi @Gurpreet.,

It was the version.. thank you for the point!

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.

Related Questions

Old ISIN does not fetch RIC code

Getting bond deal tearsheet with Python Eikon Data API

screener query in python with a large number of identifiers

Corporate Action Adjustment Factor Missing Data Bug Eikon API

Eikon API: Screener query from Excel query

  • 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