question

Upvotes
Accepted
70 3 3 7

Querying DatastreamDSWS2R with RICs

Hi,

Is it possible to query DSWS via R using package DatastreamDSWS2R with RICs instead of DS codes as identifiers? I tried the following but it won't work because it requires DS code @AAPL instead of AAPL.OQ. If this is not possible, can you suggest a workaround to get the DS codes from a list of RICs? cheers

  ds_instruments <- c("AAPL.OQ")
  ts_prices <- mydsws$timeSeriesRequest(instrument = ds_instruments,
                                        datatype = "P", startDate = ymd("20221231"),
                                        endDate = "-0D", frequency = "D")


#technologydatastream-apidsws-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.

@gino.cenedese

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

yes all good thanks!

1 Answer

· Write an Answer
Upvote
Accepted
5.8k 21 2 6

Hi @gino.cenedese, LSEG does not support Datastream's R wrapper. It is community made. With that said, the Python wrapper, that LSEG does support, allows for the use of RICs. To use them, one can put signs around RICs to let Datastream know you are using RICs, not Numonics as shown here.
E.g.:


ds.get_data('<MSFT.O>,<AAPL.O>,<IBM.N>', fields=['P'], start='2018-01-01', end='2018-01-10', freq='D')



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.

Hi Jonathan, many thanks for the reply! By the way, it turns out that adding <> around RICs also works for the Datastream's R wrapper. Thanks!

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.