Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 2 5

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apirics
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
Accepted
80.3k 259 52 75

@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 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 2 5

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 512.0 KiB each and 1.0 MiB total.

Upvotes
80.3k 259 52 75

@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 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 2

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 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.