Hi There,
We put together a rough sketch of the code that could be used to access prices and market capitalisation of the 300 companies each day. I run into some problems using this code for all 300 companies, but could you please see if it works in this environment?
# Retrieve tickers ------------------------------------------------------
function_ds <- function(x) {use_dsws$listRequest(instrument = x,
datatype = c("NAME",
"MNEM"),
requestDate = "0D") %>%
mutate(mmyy = x)
}
tickers_300 <- function_ds("LASX300I")
# Retrieve price data for tickers -----------------------------------------
ts_req <- function(x) {use_dsws$timeSeriesListRequest(instrument = x,
datatype = c("P", "MV"),
startDate = "-0D",
endDate = "-0D",
frequency = "D")}
# the following line works properly - get price data for first 20 tickers but I cannot get price data for 30 tickers
# following results in error: Error requesting data. HTTP message was: Server error : Internal Server Error : Server error: (500) Internal Server Error
Can you recommend us on how to do this for larger quantity?