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")


Best Answer

  • 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')



Answers

  • 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!