DSWS equivalent for excel query

I was looking for the DSWS equivalent to of this excel addin formula:

=@DSGRD("IN:REL","WC09302","-1d","","D","RowHeader=true;ColHeader=true;DispSeriesDescription=false;YearlyTSFormat=false;QuarterlyTSFormat=false","")


Appreciate your help.

Tagged:

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @rajanraju

    Thanks for reaching out to us.

    You can use the DatastreamPy library to retrieve the same data as that excel addin formula.

    The code looks like this:

    import DatastreamPy as DSWS
    ds = DSWS.Datastream(username = "username", password = "password")
    ds.get_data(tickers="IN:REL",fields=["WC09302"],start="-1D",freq="D")

    The output is:

    1663638230777.png

    Please feel free to reach out if you have any further questions.