Eikon Python API - fetching SPX options data

Best Answer

  • You can get options data for ES using a chain RIC. In this case 0#ESU8+ chain RIC will give you options for Sept Expiry ES future. Try the following API call:

    fields = ['CF_DATE', 'EXPIR_DATE', 'PUTCALLIND', 'STRIKE_PRC', 'CF_CLOSE', 'IMP_VOLT'] 
    es, err = ek.get_data('0#ESU8+', fields=fields)
    es.head()

    Note: the first row returns the underlying future for reference

Answers