Eikon API - multiple duplicate index when ric is expired

When I query a ric that is expired I obtain a time series with multiple duplicate indexes.

Do you know how to fix this?


Example:


import eikon as ek

result = ek.get_timeseries( 'LCON2' )



example.png




Tagged:

Best Answer

  • raksina.samasiri
    Answer ✓

    hi @davide.costanzo ,

    First, to get the expired RIC, get_data can be used to find the RIC of expired instrument

    df, err = ek.get_data(['LCON2'], [ 'TR.RIC'])
    df

    1655958404897.png

    The RIC is LCON2^2, then use get_timeseries to retrieve the data. Please see the code and output below

    result = ek.get_timeseries( 'LCON2^2')
    result

    1655958501968.png

    Hope this helps