question

Upvote
Accepted
63 10 17 19

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.

datastream-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@rajanraju

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@rajanraju

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.9k 250 52 74

@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.


1663638230777.png (12.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.