Historical data for bid/ask spread for stocks

Emilymevo
Emilymevo Newcomer
edited December 2024 in Eikon Data APIs

Hello,

I would like to retrieve bid/ask spread for a list of stocks on a specific date historically. But I found it is not possible to directly retrieve in the desktop. Therefore I am considering using Python. Could anyone help me with this? Thanks a lot in advance!

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Emilymevo

    Thank you for reaching out to us.

    If you are using a desktop application (Eikon or Workspace), you can use LSEG Data Library for Python to retreive data. The examples are on GitHub.

    The get_history method can be used to retrieve historical data. For example:

    df = ld.get_history(
        universe = ['IBM.N','MSFT.O'],   
        fields = ['BID','ASK'],   
        end = "2024-11-07",
        count=1   
        )
    
    df
    

    The output is:

    image.png

    I hope this will help.

Answers