% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers-exchange-info.R
\name{round_price_qty}
\alias{round_price_qty}
\alias{util_round_price_qty}
\title{Round price and quantity to exchange increments}
\usage{
round_price_qty(
  exchangeInfo,
  symbol,
  price = NULL,
  quantity = NULL,
  round_dir = c("down", "up")
)

util_round_price_qty(
  exchangeInfo,
  symbol,
  price = NULL,
  quantity = NULL,
  round_dir = c("down", "up")
)
}
\arguments{
\item{exchangeInfo}{Exchange info from \code{\link[=futures_get_exchange_info]{futures_get_exchange_info()}}.}

\item{symbol}{Trading pair symbol, for example \code{"ETHUSDT"}.}

\item{price}{Optional price to round using the symbol tick size.}

\item{quantity}{Optional quantity to round using the symbol step size.}

\item{round_dir}{Direction: \code{"down"} or \code{"up"}.}
}
\value{
A list with elements \code{price} and \code{quantity}.
}
\description{
Round price and quantity to exchange increments
}
\examples{
exchange_info <- list(
  symbols = list(
    ETHUSDT = list(
      filters = list(
        list(filterType = "PRICE_FILTER", tickSize = "0.01"),
        list(filterType = "LOT_SIZE", stepSize = "0.001")
      )
    )
  )
)
round_price_qty(exchange_info, "ETHUSDT", price = 1800.123, quantity = 0.12345)
}
