% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/def_constants.R
\name{set_okxr_options}
\alias{set_okxr_options}
\title{Set or get okxr options}
\usage{
set_okxr_options(raw_data = NULL, timeout = NULL)
}
\arguments{
\item{raw_data}{Logical. If `TRUE`, return raw API `data`.
If `NULL`, the current value is left unchanged.}

\item{timeout}{Numeric. HTTP request timeout in seconds. If `NULL`, the
current value is left unchanged.}
}
\value{
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.
}
\description{
Convenience wrapper to set global options for okxr, such as whether to
return raw data instead of parsed data.
}
\examples{
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
}
