% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers_get_market.R
\name{get_public_convert_contract_coin}
\alias{get_public_convert_contract_coin}
\title{Convert between contract size and currency amount}
\usage{
get_public_convert_contract_coin(
  inst_id,
  sz,
  type = NULL,
  px = NULL,
  unit = NULL,
  op_type = NULL,
  config = NULL,
  tz = .okx_default_tz
)
}
\arguments{
\item{inst_id}{Character. Instrument ID.}

\item{sz}{Character or numeric. Quantity to convert.}

\item{type}{Character or `NULL`. Convert type: `"1"` for currency to
contract, `"2"` for contract to currency.}

\item{px}{Character, numeric, or `NULL`. Optional order price.}

\item{unit}{Character or `NULL`. Currency unit, `"coin"` or `"usds"`.}

\item{op_type}{Character or `NULL`. Order type for futures or swaps, such as
`"open"` or `"close"`.}

\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 conversion result fields `type`, `instId`, `px`,
  `sz`, and `unit`.
}
\description{
Convert the crypto value to the number of contracts, or vice versa.
}
