EIKON API - download of EIA statistics

I'd like to download, using the Python API , the time series of the weekly EIA(DOE) statistics of oil inventories. I can see this data in Eikon (see attachment) but I can't download it in the API using get_timeseries ( I tried to use the RIC "CS-STK-T-EIA" , but it wont work)

How can I do it?

Thanks

capture1.png

Best Answer

  • This data is released weekly, so you need to make sure to stipulate a "weekly" interval when retrieving.

    EIA = ek.get_timeseries(["CS-STK-T-EIA"],["CLOSE"], start_date = "2019-01-01",
    end_date = "2019-01-20", interval="weekly")

    EIA.head(3)

    image