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
23 2 3 3

Getting Economic releases via API

Hi,


I have the api up and running for quotes, I would like to get Live economic releases, can some one help me with this.


This is an example of what I am looking to get:


eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apic#economic-data
1596204257605.png (114.7 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
Accepted
39.4k 77 11 27

@gordon.konheiser

If you use C#, I suggest you use Eikon .NET APIs to subscribe to the streaming real-time record corresponding to the economic indicator you're interested in, e.g. USGDPA=ECI, GBGDP=ECI etc. You can get consensus forecast from Reuters polls from the field RTR_POLL and the actual from the field ECON_ACT. For the full list of fields applicable to economic indicators use Data Item Browser app in Eikon application: under the Filters select Content Classification - Real Time - Economic Indicators. Once you establish the subscription to the streaming real-time record you'll receive the initial image of the record with the content as of the time when the subscription is established as well as the updates once any of the fields specified in the subscription request have updated.

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
39.4k 77 11 27

If you're looking to get current or previous values of economic indicators, you can retrieve this data using indicators' RICs, e.g.

ek.get_data(['USGDPA=ECI','GBGDP=ECI'],
            ['ECON_ACT','FCAST_PRD','ECI_ACT_DT'])

But if you're looking to compile the list of economic indicators that have recently been released or that are scheduled to be released soon, I'm afraid this capability is not currently available through Eikon APIs.

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
18.2k 21 13 21

Hi @gordon.konheiser

I can suggest you to get an interested country (one by one).

https://developers.refinitiv.com/article/retrieve-cross-economic-data-using-eikon-data-apipython-refinitiv

Function to build an ECI list for a country:

import pandas as pd
import time

def getUnderlying(baseRic):
    LONGNEXTLR = baseRic
    #For LONGLINK1 to LONGLINK15 and LONGNEXTLR fields
    fields = ['LONGLINK{}'.format(x) for x in range(1, 15)]
    fields.append('LONGNEXTLR')

    all_underlying_rics = []

    #if LONGNEXTLR is not empty, try to retrieve the data fields
    while LONGNEXTLR!='':
        df,e = ek.get_data(LONGNEXTLR,fields)
        LONGNEXTLR = df.iloc[0]['LONGNEXTLR'] if pd.notnull(df.iloc[0]['LONGNEXTLR']) else ''
        
        #If LONGLINK<x> field is not null, append its value to all_underlying_rics list
        for x in range(1, 15):
            currentField = 'LONGLINK{}'.format(x)
            all_underlying_rics.append(df.iloc[0][currentField]) if pd.notnull(df.iloc[0][currentField]) else None
        #delay between each API call for 1 second
        time.sleep(1)

    #delete first 2 elements(not country indocators) from the list and return the remaining list
    del all_underlying_rics[0:2]
    return all_underlying_rics

Try to get 2 countries:

KRIndicators = getUnderlying('ECONALLKR')
HKIndicators = getUnderlying('ECONALLHK')

Try to get the data:

fields = ['NDOR_1', #Next Release
          'TR.IndicatorName' #Name
          ,'FCAST_PRD' #Period
          ,'RTR_POLL' #Reuters Poll
          ,'FCAST_ACRY' #Surprise
          ,'ECON_ACT' #Actual
          ,'ECON_PRIOR' #Prior
          ,'PRIOR_REV'#Revised
         ]
df,e = ek.get_data(KRIndicators, fields)
display(df)
df2,e = ek.get_data(HKIndicators, fields)
display(df2)


ahs.png (68.1 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
23 2 3 3

Hi Guys thanks for your help. What I am looking for is


1) To get the expectation of a release, the Reuters poll

2) To get the actual release streamed as soon as it arrives.


Im working in C# but python examples should be fine.

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
23 2 3 3

Hi,

Where can I get a list of all the field names i.e max , min for econ releases ?


Thanks

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.

@gordon.konheiser

When asking a new question on these forums, please always start a new thread. Old threads with accepted answers are not monitored by moderators. To answer your question, to view the list of fields for a real-time record open a Quote app in Eikon, type in the RIC for the econ indicator you're interested in. After the quote is displayed right click within the Quote app and from the right-click menu select Template - Display All Fields. This will give you the raw view of a real-time data record as a vector of field name/value pairs. If you have further questions, please start a new thread.

OK , will post new question from now on

Upvotes
23 2 3 3

also the rawValue that comes back , is that always castable to a decimal ?

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.

I'm not sure what rawValue refers to here. Which API calls do you use? Would you mind elaborating and providing some context? Please do it in a new thread.

Hi, I am using the :


when I send a request i get this back:



The RawValue is the result of my request and it is of type object, I want to know how I should cast it.


Thanks

1604394271975.png (9.9 KiB)
1604394456503.png (11.4 KiB)

If you want the output as System.Decimal or System.Decimal?, use ready available ToDecimal or ToNullableDecimal converters instead of RawValue. RawValue is provided in case you would like to cast the value as a type not provided by ready available converters. If you have any further questions, ask them on a new thread.

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.