How can I download historical Brent and WTI contract.

I am looking to download historical Brent contracts. For example, on the Reuters terminal or on the Excel API, if I am looking for the Brent contract expiring in December 2012, I am able to download prices by using the RIC code "LCOZ2^1".

However, on the Eikon API for Python, when I type:

bre = ek.get_timeseries('LCOZ2ˆ1', start_date = dt.datetime(2007,1,1))

I get:

EikonError: 'Error code Error | LCOZ2ˆ1: Invalid RIC |  '

Is it normal? How can I access the historical data for this contract through the API?

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    I have no problem on my end executing get_timeseries method with parameters you specified. I could not however copy & paste the RIC from your request to mine. The encoding of the caret symbol appears to be wrong. Try executing the same request again, but make sure to type in the RIC from keyboard as opposed to copy & paste it.

Answers