% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers_get_trade.R
\name{get_trade_orders_pending}
\alias{get_trade_orders_pending}
\title{Get all pending trade orders}
\usage{
get_trade_orders_pending(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 (e.g. `"Asia/Hong_Kong"`).}
}
\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`.
}
\description{
Retrieve all currently open (unfilled) orders for your OKX account.
}
\details{
Returns one row per open order. Timestamps are parsed to `POSIXct` using `tz`.
}
\note{
Since okxr 0.1.1
}
\section{Common errors}{

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

\examples{
\dontrun{
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
df <- get_trade_orders_pending(config = cfg, tz = "Asia/Hong_Kong")
head(df)
}

}
\seealso{
[get_trade_order()], [get_trade_orders_history_7d()]
}
