Eikon API: Get Data - Constituents as of a certain date

Is it possible to get the constituents of an index at a given date?

In Excel we can use the following formula:

=TR("0#.AEX","TR.RIC","SDate=2016-12-31")

With the Eikon API, this works:

rics, err = eikon.get_data("0#.AEX","TR.RIC")
rics

But this doesn't work:

rics, err = eikon.get_data("0#.AEX","TR.RIC", "SDate=2016-12-31")
rics

It results in the following error:

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thank you so much in advance for your help!

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    It is similar to this question.

    rics, err = ek.get_data(instruments="0#.AEX", fields=["TR.RIC"], parameters={'SDate':'2016-12-31'})

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.