Fetch the current time from IB's servers.
req_current_time(channel = NULL)
| channel | One of the following:
|
|---|
A POSIXct date-time object. See DateTimeClasses for details.
IB servers use the UTC timezone, but req_current_time() returns the
time in terms of whatever time zone is set in your current session of R. To
check your timezone, run the basic R command
Sys.timezone().
Other quick fetch:
req_family_codes(),
req_managed_accts()
# Fetch the current time current_time <- req_current_time() # Verify that current_time is a POSIXct object class(current_time)#> [1] "POSIXct" "POSIXt"# Print current_time current_time#> [1] "2020-03-17 13:18:55 EDT"