Function: buildRequestTradeDto()
gSwap SDK 2.0.0-rc.4 / buildRequestTradeDto
Function: buildRequestTradeDto()
buildRequestTradeDto(
input):RequestTradeDTO
Defined in: packages/gswap-sdk/dist/index.d.ts:3847
Builds the RequestTrade DTO: exactIn sells that much of the input token (sell0Qty or
sell1Qty), exactOut buys that much of the output token (buy1Qty or buy0Qty), plus the
side's slippage bound and an optional priceLimit. Key order is
token0, token1, fee, uniqueKey, then the one quantity, then the slippage bound, then
priceLimit.
Parameters
input
Returns
Example
const dto = buildRequestTradeDto({
token0: quote.token0Symbol, token1: quote.token1Symbol,
tokenInIsToken0: quote.tokenInIsToken0, fee: quote.fee,
uniqueKey: createUniqueKey('galaswap-operation-'),
exactIn: '100', amountOutMinimum: '14',
});