Commitment of Traders historical data for ICE EUA Futures using refinitiv.data with python api

I would like to get historical data for COT data.

Using the refinitiv.data.get_history function with following parameters

instruments = [
'1ICEEUAIFCITTLNG',
'1ICEEUAIFCITTSHT',
'1ICEEUAIFTTLNG',
'1ICEEUAIFTTSHT',
'1ICEEUAOIFTTLNG',
'1ICEEUAOIFTTSHT',
'1ICEEUACUTTLNG',
'1ICEEUACUTTSHT',
'1ICEEUAOOTTLNG',
'1ICEEUAOOTTSHT',
]

fields = [
'CL_LAST',
'CF_CLOSE',
'CF_NAME',
]
start = '2023-05-15'
end = '2023-05-30'

interval = '1D'


returns an empty dataframe.

The rd.get_data function works perfectly with similar arguments

Is it possible to get historical data for COT data for ICE EUA Futures?

Best Answer

  • aramyan.h
    Answer ✓

    Hi @YBugnion ,


    Thank you for your question. The error while requesting these fields suggest that The universe does not support these fields. While trying not to specify the fields (which returns all available) I got PRIMACT_1 and OPEN1. Please see below:

    rd.get_history(universe = [
    '1ICEEUAIFCITTLNG',
    '1ICEEUAIFCITTSHT',
    '1ICEEUAIFTTLNG',
    '1ICEEUAIFTTSHT',
    '1ICEEUAOIFTTLNG',
    '1ICEEUAOIFTTSHT',
    '1ICEEUACUTTLNG',
    '1ICEEUACUTTSHT',
    '1ICEEUAOOTTLNG',
    '1ICEEUAOOTTSHT',
    ],

    start = '2023-05-15',
    end = '2023-05-30',

    interval = '1D')



    screenshot-2023-05-31-at-202545.png


    Hope this helps.


    Best regard,

    Haykaz

Answers

  • suddenly this code does not work for me. I keep receiving timeout error (refinitiv.data._errors.RDError: Error code -1 | timed out)

    Would you please be able to assist?