Generates a swap quote based on input parameters such as the assets, amount, slippage tolerance, and recipient/refund information.
Returns pricing details, estimated time, and a unique deposit address to which tokens must be transferred to initiate the swap.
You can set the dry parameter to true to simulate the quote request without generating a deposit address or initiating the swap process. This is useful for previewing swap parameters or validating input data without committing to an actual swap.
This endpoint is the first required step in the swap process.
Enter JWT token (optional)
Flag indicating whether this is a dry run request.
If true, the response will NOT contain the following fields:
depositAddresstimeWhenInactivedeadlinetrue
How to interpret amount (and refunds) when performing the swap:
EXACT_INPUT — requests the output amount for an exact input.
amountIn, the deposit is refunded by deadline.amountIn, the swap is processed and the excess is refunded to refundTo address after swap is complete.EXACT_OUTPUT — requests the input amount for an exact output.
minAmountIn and maxAmountIn.maxAmountIn the swap is processed and the excess is refunded to refundTo address after swap is complete.minAmountIn, the deposit is refunded by deadline.FLEX_INPUT — a flexible input amount that allows for partial deposits and variable amounts.
slippage applies both to amountOut and amountIn and defines an acceptable range (minAmountIn and minAmountOut).minAmountIn is accepted and converted to the output asset as long as minAmountOut is met.amountIn can be less, as long as the 'slippage + 1%' constraint is met. If the total received by the deadline is below the lower bound, the deposit is refunded.EXACT_INPUT, EXACT_OUTPUT, FLEX_INPUT, ANY_INPUT Slippage tolerance for the swap. This value is in basis points (1/100th of a percent), e.g. 100 for 1% slippage.
100
ID of the origin asset.
"nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near"
Type of deposit address:
ORIGIN_CHAIN - deposit address on the origin chain.INTENTS - the account ID within NEAR Intents to which you should transfer assets.ORIGIN_CHAIN, INTENTS ID of the destination asset.
"nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near"
Amount to swap as the base amount. It is interpreted as the input or output amount based on the swapType flag and is specified in the smallest unit of the currency (e.g., wei for ETH).
"1000"
Address used for refunds.
"0x2527D02599Ba641c19FEa793cD0F167589a0f10D"
Type of refund address:
ORIGIN_CHAIN - assets are refunded to the refundTo address on the origin chain.INTENTS - assets are refunded to the refundTo Intents account.ORIGIN_CHAIN, INTENTS Recipient address. The format must match recipientType.
"13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRK"
Type of recipient address:
DESTINATION_CHAIN - assets are transferred to the chain of destinationAsset.INTENTS - assets are transferred to an account inside IntentsDESTINATION_CHAIN, INTENTS Timestamp in ISO format that identifies when the user refund begins if the swap isn't completed by then. It must exceed the time required for the deposit transaction to be mined. For example, Bitcoin may require around one hour depending on the fees paid.
"2019-08-24T14:15:22Z"
What deposit address mode you will get in the response, most chain supports only SIMPLE and some(for example stellar) only MEMO:
SIMPLE - usual deposit with only deposit address.MEMO - some chains will REQUIRE the memo together with depositAddress for swap to work.SIMPLE, MEMO "SIMPLE"
Addresses of connected wallets.
["0x123...", "0x456..."]Unique client session identifier for 1Click.
"session_abc123"
EVM address of a transfer recipient in a virtual chain
"0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C"
EVM address of a refund recipient in a virtual chain
"0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C"
HIGHLY EXPERIMENTAL Message to pass to ft_transfer_call when withdrawing assets to NEAR.
Otherwise, ft_transfer will be used.
WARNING: Funds will be lost if used with non NEP-141 tokens, in case of insufficient storage_deposit or if the recipient does not implement ft_on_transfer method.
"smart-contract-recipient.near"
Referral identifier (lowercase only). It will be reflected in the on-chain data and displayed on public analytics platforms.
"referral"
Time in milliseconds the user is willing to wait for a quote from the relay.
If you want to receive the fastest quote - use 0 as a value
3000
List of recipients and their fees
Unique identifier for request tracing and debugging
"550e8400-e29b-41d4-a716-446655440000"
Timestamp in ISO format that was used to derive the deposit address
"2019-08-24T14:15:22Z"
Signature of the 1Click service confirming the quote for the specific deposit address. Must be saved on the client side (along with the whole quote) in order to resolve any disputes or mistakes.
User request
Response containing the deposit address for sending the amount of originAsset and the expected output amount.