How to get list of leaver companies of the ASX 100 using the Python API?

I've been using the following code to get a list of current ASX 100 companies:

ek.get_data(['.ATOIA'], ['TR.IndexConstituentRIC','TR.IndexConstituentName'])

Using the desktop program, I can also get a complete list of all the leavers and joiners in the ASX 100 over time.

Does anyone know how I can use the Python API to get a similar dataset of all the leavers of this index?

Best Answer

  • Zhenya Kovalyov
    Answer ✓

    To get the leavers for the last calendar year, for example, you need to do this:

    f = ['TR.IndexJLConstituentChangeDate','TR.IndexJLConstituentName',
    'TR.IndexJLConstituentRIC','TR.IndexJLConstituentComName']
    df, e = tr.get_data(['.ATOI'], fields=f, parameters={'IC':'L', 'SDate':'0D', 'EDate':'-1CY'}

Answers