View source: R/wrappers_get_account.R
| get_account_balance | R Documentation |
Retrieve account-level margin and equity information for your OKX account.
get_account_balance(config, tz = .okx_default_tz)
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"'. |
This wraps '/api/v5/account/balance'. Returns one row per account-level equity snapshot. Timestamps are parsed into 'POSIXct' in the given 'tz'.
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'.
Since okxr 0.1.1
[get_account_positions()], [get_account_leverage_info()]
## Not run:
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
bal <- get_account_balance(config = cfg)
head(bal)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.