Download a generic file from Bloomberg. Use RblFiles to list the files available at Bloomberg. If the file is not available yet (i.e. a request file has just been uploaded), the function waits until the response file is there or the timeout is reached

RblDownload(file, frequency = 60, timeout = 3600, verbose = TRUE)

Arguments

file

character string representing the file to download

frequency

the polling frequency to check if file is available at Bloomberg

timeout

the timeout in seconds

verbose

logical. Should R report extra information on progress?

Value

character string. Path to the downloaded file. NULL on failure

Examples

if (FALSE) { # \dontrun{
# Run RblConnect first

# Build a request file to download the daily closing prices of 
#  EURO STOXX Index from 2005-01-01 to 2015-12-31.
RblRequest <- 
     RblRequestBuilder(
          header = c(FIRMNAME = RblUser(), 
                     PROGRAMNAME = 'gethistory', 
                     DATERANGE = '20050101|20151231'),
          fields = c('PX_LAST'), 
          identifiers = c('SXXE Index')
     )
                                
# Upload the request file
req <- RblUpload(RblRequest)

# Download the response file
out <- RblDownload(req$out)
out
} # }