Other/testStaticRequest.R

pricesList<-"LFTSE100"

dwei <- getDataStream(User=options()$Datastream.Username,Pass=options()$Datastream.Password)

constituents <- listRequest(dwei = dwei, DSCode = pricesList, 
                              Expression = "NAME", startDate = Sys.Date(),endDate = Sys.Date(), verbose = TRUE)

stopifnot(nrow(constituents)>98)  #FTSE100 has more than 100 constituents!


pricesList<-c("ABF","RIO","WPP")

dwei <- getDataStream(User=options()$Datastream.Username,Pass=options()$Datastream.Password)

constituents <- staticRequest(dwei = dwei, DSCode = pricesList, 
                              Expression = "NAME", endDate = Sys.Date(), verbose = TRUE)

stopifnot(nrow(constituents)>98)  #FTSE100 has more than 100 constituents!
CharlesCara/Datastream2R documentation built on May 6, 2019, 9:57 a.m.