Pull Oil related data using Datastream API

Options
Hemant
Hemant Newcomer
edited July 9 in Datastream

I am interested in getting the following data points using python APIs (say get_data or get_history end points)
1) Crude Oil (WTI in USD)
2) Brent Crude Oil futures contract.

Output: Daily data for last 1 month

Can someone please help on the same

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Hemant

    Thank you for reaching out to us.

    Please confirm the API that you are using.

    If it is a Datastream product, you can use the Datastream Navigator to search for items and data types. For example:

    image.png

    Otherwise, you contact the Datastream support team directly via LSEG Support and ask for items and data types that can provide the required data.

    Then, the DatastreamPy code will look like this.

    ds.get_data(
        tickers = 'CRUDOIL',
        fields = ['X'],
        freq = 'D',
        start = '-1M',
        kind  = 1)