% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers_get_market.R
\name{get_public_instruments}
\alias{get_public_instruments}
\title{Get instrument metadata}
\usage{
get_public_instruments(
  inst_id = NULL,
  inst_type = "SWAP",
  config = NULL,
  tz = .okx_default_tz
)
}
\arguments{
\item{inst_id}{Character or `NULL`. Specific instrument ID to query. Use
`NULL` to fetch all instruments of `inst_type`.}

\item{inst_type}{Character. Instrument type. One of `"SPOT"`, `"MARGIN"`,
`"SWAP"` (default), `"FUTURES"`, `"OPTION"`.}

\item{config}{Optional list. Public endpoint request options, such as
`timeout`; credentials are not required.}

\item{tz}{Character. Time zone for parsing timestamps. Default `"Asia/Hong_Kong"`.}
}
\value{
A `data.frame` with instrument metadata (e.g., `instType`, `instId`, `uly`,
`baseCcy`, `quoteCcy`, `settleCcy`, `ctVal`, `ctMult`, `tickSz`, `lotSz`,
`minSz`, `expTime`, `lever`, `state`, …).
}
\description{
Retrieve metadata for instruments of a given type.
}
\details{
Wraps `/api/v5/public/instruments`. Returns one row per instrument,
including contract specifications, tick size, lot size, expiry, and state.
}
\note{
Since okxr 0.1.2
}
\examples{
\dontrun{
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
# Get metadata for all SWAP instruments
df <- get_public_instruments(inst_type = "SWAP", config = cfg)

# Get metadata for one instrument
get_public_instruments("ETH-USDT-SWAP", inst_type = "SWAP", config = cfg)
}

}
\seealso{
[get_public_mark_price()]

Other okxr-market: 
\code{\link{get_market_candles}()},
\code{\link{get_market_history_candles}()},
\code{\link{get_public_mark_price}()}
}
\concept{okxr-market}
