question

Upvotes
Accepted
1 3 2 5

Eikon API by giving condition as = R

Hi Team,

Can you please help me to pull data from Eikon API by giving condition as = R and it should pull Record Type of 21 from that, Example RIC(DJX50N1W=R).

eikon-data-api#technologyapi
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @Shalini.YPatted

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
14.2k 30 5 10

Hi @Shalini.YPatted ,

If you have an access to Eikon Data API, you should have an access to RD Library desktop session. Hence, you can try function search of RD library. Its quick start guide can be found here

import refinitiv.data as rd
rd.open_session()

ric_df = rd.discovery.search(
    view = rd.discovery.Views.SEARCH_ALL,
    top = 10,
    filter = "( RIC eq '*=R')",
    select = "RIC"
)

ric_list = ric_df['RIC'].to_list()

ric_list

parameter top is The maximum number of documents to retrieve, so you can adjust this to get more number of result

Then convert the RICs returned to a list to be an input of the next step

1699610446739.png

rd.get_data(ric_list, [ 'RECORDTYPE'])

1699610499179.png

An example of RD library search function can be found at https://github.com/LSEG-API-Samples/Example.DataLibrary.Python/blob/main/Examples/1-Access/EX-1.01.06-Search.ipynb


1699610446739.png (25.7 KiB)
1699610499179.png (14.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
24.8k 54 17 14

Hello @Shalini.YPatted

The code should be like this:

import refinitiv.data.eikon as ek
ek.set_app_key('APP_KEY') #'DEFAULT_CODE_BOOK_APP_KEY' if you are on CodeBook


df, err = ek.get_data(['DJX50N1W=R'], [ 'RECORDTYPE'])
df

Result:

result.png

Please note that you can use the Data Item Browser (Seach "DIB" on your Eikon/Workspace), then input your item code (RIC Code) and you can search all available fields that the item provide as follows:

dib.png

You can find more detail about the Data Item Browser app from this https://developers.lseg.com/en/video-catalog/data-item-browser video.


result.png (9.1 KiB)
dib.png (73.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 3 2 5

Hi Wasim,

Thanks for checking.

Any RIC that ends with = R, I want code to pick = R and produce record type for all of those RICs

is it possible to get the output from Eikon API by giving condition.

Example RIC (DJX50N1W=R) which ends with = R.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.