View source: R/def_constants.R
| set_okxr_options | R Documentation |
Convenience wrapper to set global options for okxr, such as whether to return raw data instead of parsed data.
set_okxr_options(raw_data = NULL, timeout = NULL)
raw_data |
Logical. If 'TRUE', return raw API 'data'. If 'NULL', the current value is left unchanged. |
timeout |
Numeric. HTTP request timeout in seconds. If 'NULL', the current value is left unchanged. |
An invisible named list with the current package options: 'raw_data' (logical) and 'timeout' (numeric seconds). This return value can be used to inspect the effective option state.
old <- getOption("okxr.raw_data")
old_timeout <- getOption("okxr.timeout")
set_okxr_options(raw_data = TRUE)
set_okxr_options(timeout = 5)
options(okxr.raw_data = old, okxr.timeout = old_timeout)
set_okxr_options() # check current values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.