get_trade_orders_pending: Get all pending trade orders

View source: R/wrappers_get_trade.R

get_trade_orders_pendingR Documentation

Get all pending trade orders

Description

Retrieve all currently open (unfilled) orders for your OKX account.

Usage

get_trade_orders_pending(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 (e.g. '"Asia/Hong_Kong"').

Details

Returns one row per open order. Timestamps are parsed to 'POSIXct' using 'tz'.

Value

A 'data.frame' with one row per pending order and columns following the OKX schema (e.g., 'cTime', 'ordId', 'clOrdId', 'tag', 'instId', 'ordType', 'px', 'sz', 'side', 'posSide', 'tdMode', 'accFillSz', 'fillPx', 'fillSz', 'fillTime', 'avgPx', 'state', 'lever', ...). Timestamp columns are 'POSIXct'.

Common errors

- HTTP 401 Unauthorized (missing/invalid credentials) - Rate limiting: HTTP 429 / OKX throttle codes

Note

Since okxr 0.1.1

See Also

[get_trade_order()], [get_trade_orders_history_7d()]

Examples

## Not run: 
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
df <- get_trade_orders_pending(config = cfg, tz = "Asia/Hong_Kong")
head(df)

## End(Not run)


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