get_account_balance: Get account balance

View source: R/wrappers_get_account.R

get_account_balanceR Documentation

Get account balance

Description

Retrieve account-level margin and equity information for your OKX account.

Usage

get_account_balance(config, tz = .okx_default_tz)

Arguments

config

List. API credentials/config, typically containing 'api_key', 'secret_key', and 'passphrase'. May also include 'base_url'.

tz

Character. Time zone for parsing timestamps. Default '"Asia/Hong_Kong"'.

Details

This wraps '/api/v5/account/balance'. Returns one row per account-level equity snapshot. Timestamps are parsed into 'POSIXct' in the given 'tz'.

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'.

Note

Since okxr 0.1.1

See Also

[get_account_positions()], [get_account_leverage_info()]

Examples

## Not run: 
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
bal <- get_account_balance(config = cfg)
head(bal)

## End(Not run)


okxr documentation built on May 8, 2026, 5:09 p.m.