Unable to Retrieve Volume Data

Using lseg.data python API, i am able to retrieve OHLC prices for this symbol TFMBMc1 but unable to retrieve any Volume data? There should be volume data based on the chart

My code below:

get ohlc data

ohlc_data = ld.get_history(
universe=["NGLNMc1"], # Replace with your desired symbol
# universe=["TFMBMc1", "TFMBSc1", "NGLNMc1", "NGLNSc1", "DEBYc1", "CFI2Z5", "LCOc1", "NGc1"],
fields=["TR.OPENPRICE", "TR.HIGHPRICE", "TR.LOWPRICE", "TR.SETTLEMENTPRICE", "TR.Volume"],
interval="1D", # Options: "1D" (daily), "1W" (weekly), "1M" (monthly), etc.
start="2025-01-01",
end="2025-03-03"
)

Second question: Am I able to use both lseg.data and refinitiv.data API at the same time?

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @tanjunjie91

    Thank you for reaching out to us.

    To retrieve historical real-time fields, you can ignore the fields parameter. The library will return the available real-time fields for the subscribed items.

    ohlc_data = ld.get_history(
        universe=["NGLNMc1"], # Replace with your desired symbol
        interval="1D", # Options: "1D" (daily), "1W" (weekly), "1M" (monthly), etc.
        start="2025-01-01",
        end="2025-03-03"
    )
    ohlc_data
    

    The output is:

    image.png

    The available real-time fields for this RIC are:

    Index(['TRDPRC_1', 'OPEN_PRC', 'HIGH_1', 'LOW_1', 'ACVOL_UNS', 'BID', 'ASK',       'OPINT_1', 'TOTCNTRVOL', 'TOTCNTROI', 'SETTLE', 'MID_PRICE', 'VWAP',       'EXERCISED', 'IRGVOL', 'EFP_VOL', 'ORDBK_VOL', 'NUM_MOVES',       'EXPIR_DATE', 'CRT_MNTH', 'SETL_PCHNG', 'SETL_NCHNG'],      dtype='object', name='NGLNMc1')