How to obtain expired equity options daily open interest and close prices via python api/ excel api?

How to obtain expired equity options daily open interest and close prices via python api/ excel api?

Best Answer

  • @kenneth.fung You would need to know the expired option RICs and the time period they were active - but if you have those:

    df, err = ek.get_data(['IWME241915500.U^E19','HSI27800P9.HF^D19'],['TR.CLOSEPRICE.date','TR.IMPLIEDVOLATILITY','TR.CLOSEPRICE','TR.OPENINTEREST',{'SDate':'20190415', 'EDate':'20190502'})

    df

    image