% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers_get_market.R
\name{get_public_mark_price}
\alias{get_public_mark_price}
\title{Get current mark price}
\usage{
get_public_mark_price(
  inst_id,
  inst_type = "SWAP",
  config = NULL,
  tz = .okx_default_tz
)
}
\arguments{
\item{inst_id}{Character. Instrument ID, e.g. `"BTC-USDT"`, `"ETH-USDT-SWAP"`.}

\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 columns `timestamp`, `instId`, `markPx`.
}
\description{
Retrieve the current mark price for a given instrument.
}
\details{
Wraps `/api/v5/public/mark-price`. Useful for margin calculations and PnL
estimation. Returns a single row with the latest mark price and timestamp.
}
\note{
Since okxr 0.1.1
}
\examples{
\dontrun{
cfg <- list(api_key = "xxx", secret_key = "xxx", passphrase = "xxx")
get_public_mark_price("BTC-USDT", inst_type = "SWAP", config = cfg)
}

}
\seealso{
[get_public_instruments()]
}
