Pulling of Bid-Ask Prices from LSEG

Alex
Alex LSEG
edited May 26 in Refinitiv Data Platform

We use LSEG to get Debt Securities market data from market contributors by using an API (Python). We get our LowBid-HighAsk range from the market data available such as yield or price for any particular security.

I wanted to inquire if there is an identifier to differentiate the market data if it is a yield or a trade price.

To illustrate, please see the below screen grab for a sample security 912810UGI.

912810UGI - DB.png

In generating the LowBid-HighAsk range, the correct bid-ask range we need to get should be the minimum value from the Bid column and maximum value from the Ask column. However, there are instances where the API gets the minimum value from the BidYld column for the LowBid.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Thank you for reaching out to us.

    You can use the get_history method in the LSEG Data Library for Python to retrieve real-time historical data.

    If you don't provide the fields parameter, it will return all available historical real-time fields. For example:

    df = ld.get_history(
        universe=["912810UG1=RRPS"],   
        start="2025-05-21",
        end="2025-05-22",
        interval = "1min"
    )
    df.columns
    
    Index(['BID_HIGH_1', 'BID_LOW_1', 'OPEN_BID', 'BID', 'BID_NUMMOV',
    'ASK_HIGH_1', 'ASK_LOW_1', 'OPEN_ASK', 'ASK', 'ASK_NUMMOV', 'HIGH_BYLD',
    'LOW_BYLD', 'OPEN_BYLD', 'BID_YIELD', 'HIGH_AYLD', 'LOW_AYLD',
    'OPEN_AYLD', 'ASK_YIELD', 'MID_HIGH', 'MID_LOW', 'MID_OPEN',
    'MID_PRICE', 'REAL_YLDB', 'REAL_YLDA', 'ISMA_B_YLD', 'ISMA_A_YLD',
    'HIGH_MYLD', 'LOW_MYLD', 'OPEN_MYLD', 'MID_YLD_1'],
    dtype='object', name='912810UG1=RRPS')

    You can also refer to the examples on GitHub.

    However, this forum is dedicated to software developers using LSEG APIs. The moderators on this forum do not have deep expertise in every bit of content available through LSEG products, which is required to answer content questions such as this one.

    The best resource for content questions is the Helpdesk support team, which can be reached by submitting queries through MyAccount. The support team will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.