swapType that sets how the amount field is read and how your deposit is handled. Open the option that fits your use case below — each one has a full example request, with the highlighted lines showing what makes it different.
EXACT_INPUT — fix the amount you send
EXACT_INPUT — fix the amount you send
You commit to sending an exact
amount of originAsset; the quote returns the output you’ll receive.amount is the 1 NEAR you intend to send (in yoctoNEAR).Deposit handling- Deposit below
amountIn→ refunded by thedeadline. - Deposit above
amountIn→ swap proceeds; the excess is refunded torefundTo.
The example routes through depositType
INTENTS; ORIGIN_CHAIN and DESTINATION_CHAIN also work (see the Quickstart). CONFIDENTIAL_INTENTS is also supported.EXACT_OUTPUT — fix the amount you receive
EXACT_OUTPUT — fix the amount you receive
You commit to receiving an exact
amount of destinationAsset; the quote returns the input required. Slippage applies to the input side.amount is the 10 USDT you want to end up with. The response returns amountIn (the input to send, with slippage baked in) and minAmountIn (the minimum actually needed).Deposit handling- Deposit below
minAmountIn→ refunded by thedeadline. - Deposit above
amountIn→ swap proceeds; the excess is refunded torefundTo.
The example routes through depositType
INTENTS; ORIGIN_CHAIN and DESTINATION_CHAIN also work (see the Quickstart). CONFIDENTIAL_INTENTS is also supported.FLEX_INPUT — one token, variable amount
FLEX_INPUT — one token, variable amount
Still one known Deposit handling (for the 1 NEAR → ~10 USDT quote above, at 1% slippage)
originAsset through one deposit address, but the deposit amount can vary within a band. Use it when you don’t know the exact amount at quote time — for example, sweeping a wallet whose balance is still settling.slippageTolerance applies to both sides, so the quote comes back as a band:- Deposit 0.99 NEAR or more → swapped; you receive at least 9.9 USDT.
- Deposit above the quoted 1 NEAR → still swapped (the quote is not a cap).
- Deposit below 0.99 NEAR → refunded after the
deadline, as long as the total received stays underminAmountIn.
The example routes through depositType
INTENTS; ORIGIN_CHAIN and DESTINATION_CHAIN also work (see the Quickstart). CONFIDENTIAL_INTENTS is not supported for FLEX_INPUT.ANY_INPUT — collect many tokens into one
ANY_INPUT — collect many tokens into one
Fixes only Deposit handling
destinationAsset and recipient — there’s no fixed origin asset, chain, amount, or up-front rate. It’s a standing deposit-and-sweep account: set originAsset to 1cs_v1:any and amount to "0".- Deposits arrive in any supported token into an Intents account and accumulate.
depositTypemust beINTENTSorCONFIDENTIAL_INTENTS. - They’re periodically converted into
destinationAssetand withdrawn torecipientonce the pool clears a $1,000 USD threshold. - Each conversion is quoted at sweep time, so there’s no fixed rate when you create the quote.
- The
deadlineis checked only at creation — the collector then runs indefinitely, so one quote keeps aggregating without being refreshed. - There are no refunds: a failed swap retries every 5 minutes rather than returning funds, so set
refundToto an address you control.