For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 4

Get rics of curves

Hi Everyone

I am trying to source RICs of particular swap curves - for example USDOIS=TWED or 1#USDOIS=TWED.
Does anyone know how to get all RICs which are related to this curve via ek.get_data() in Python, like USD1MOIS=TWED, USD2MOIS=TWED, etc? So for all tenors.


Thanks

Jurij

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonrics
icon clock
10 |1500

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

Upvotes
Accepted
38.1k 71 35 53

@jurij.reichenecker

You can try the code mentioned in this thread.

LONGNEXTLR = 'USDOIS=TWEB'
fields = ['LONGLINK{}'.format(x) for x in range(1, 15)]
fields.append('LONGNEXTLR')

all_components = []

while LONGNEXTLR!='':
    df,e = ek.get_data(LONGNEXTLR,fields)
    LONGNEXTLR = df.iloc[0]['LONGNEXTLR'] if pd.notnull(df.iloc[0]['LONGNEXTLR']) else ''
    for x in range(1, 15):
        currentField = 'LONGLINK{}'.format(x)
        all_components.append(df.iloc[0][currentField]) if pd.notnull(df.iloc[0][currentField]) else None
        
df,e = ek.get_data(all_components,['DSPLY_NAME','PRIMACT_1'])
df

The output is:


1587377081764.png (19.9 KiB)
icon clock
10 |1500

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

Upvotes
3 0 1 4

Great thanks that works.

Follow-up Question: I didn't know that "Longlink" exists. Can you tell me where I can explore more about such features?
icon clock
10 |1500

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

Upvotes
38.1k 71 35 53

@jurij.reichenecker

The LONGLINK fields are available in chain RICs. Chains are used to hold instrument names that have a common association. For more information, please refer to this article. You can use Eikon Quote App with "Display All Fields" to verify the format of chain RICs.

Chain RICs are prefixed with 0# and they can be internally expanded by Eikon Data APIs. However, this could be an exception.


1587434168387.png (117.4 KiB)
icon clock
10 |1500

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

Upvotes
1 0 0 0

any RIC from REFINITIVE which tenor is more than 2 years? currently the max tenor is 2Y.

icon clock
10 |1500

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

Click below to post an Idea Post Idea