View source: R/wrappers_get_trade.R
| get_trade_orders_pending | R Documentation |
Retrieve all currently open (unfilled) orders for your OKX account.
get_trade_orders_pending(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 (e.g. '"Asia/Hong_Kong"'). |
Returns one row per open order. Timestamps are parsed to 'POSIXct' using 'tz'.
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'.
- HTTP 401 Unauthorized (missing/invalid credentials) - Rate limiting: HTTP 429 / OKX throttle codes
Since okxr 0.1.1
[get_trade_order()], [get_trade_orders_history_7d()]
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.