% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers_get_account.R
\name{get_account_balance}
\alias{get_account_balance}
\title{Get account balance}
\usage{
get_account_balance(config, tz = .okx_default_tz)
}
\arguments{
\item{config}{List. API credentials/config, typically containing
`api_key`, `secret_key`, and `passphrase`. May also include `base_url`.}

\item{tz}{Character. Time zone for parsing timestamps. Default `"Asia/Hong_Kong"`.}
}
\value{
A `data.frame` with account balance and margin metrics (e.g.,
`totalEq`, `isoEq`, `adjEq`, `availEq`, `ordFroz`, `imr`, `mmr`, `upl`,
`mgnRatio`, …). Timestamp columns (`uTime`) are `POSIXct`.
}
\description{
Retrieve account-level margin and equity information for your OKX account.
}
\details{
This wraps `/api/v5/account/balance`. Returns one row per account-level
equity snapshot. Timestamps are parsed into `POSIXct` in the given `tz`.
}
\note{
Since okxr 0.1.1
}
\examples{
\dontrun{
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
bal <- get_account_balance(config = cfg)
head(bal)
}

}
\seealso{
[get_account_positions()], [get_account_leverage_info()]

Other okxr-account: 
\code{\link{get_account_config}()},
\code{\link{get_account_leverage_info}()},
\code{\link{get_account_positions_history}()},
\code{\link{get_account_positions}()}
}
\concept{okxr-account}
