Request a quote
Request a swap quote based on input parameters such as the assets, amount, slippage tolerance, and recipient/refund information. Requests are rate limited per API key.
API key generated at https://studio.aurora.dev
Flag indicating whether this is a dry run request.
If true, the response will NOT contain the following fields:
-
depositAddress -
timeWhenInactive -
deadline
trueHow to interpret amount (and refunds) when performing the swap:
-
EXACT_INPUT— requests the output amount for an exact input.-
If deposit is less than
amountIn, the deposit is refunded by deadline. -
If deposit is above than
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.-
The quote response includes
minAmountInandmaxAmountIn. -
If the input is above
maxAmountIn, the swap is processed and the excess is refunded torefundToafter the swap is complete. -
If the input is below
minAmountIn, the deposit is refunded by deadline.
-
-
FLEX_INPUT— a flexible input amount that allows for partial deposits and variable amounts.-
slippageapplies both toamountOutandamountInand defines an acceptable range (minAmountInandminAmountOut). -
Any amount higher than
minAmountInis accepted and converted to the output asset as long asminAmountOutis met. -
amountIncan 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. -
If deposits exceed the upper bound, the swap is still processed.
-
EXACT_INPUTPossible values: 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. -
CONFIDENTIAL_INTENTS- the account ID within Confidential Intents to which assets are to be transferred. Fund the swap from a Confidential Intents account by submitting a signed transfer intent to the quotedepositAddress. Direct token transfers are not supported.
ORIGIN_CHAINPossible values: What deposit address mode you will get in the response.
Most chains support only SIMPLE, and some (for example stellar) only MEMO:
-
SIMPLE- usual deposit with only a deposit address. -
MEMO- some chains require thememotogether withdepositAddressfor the swap to work.
SIMPLEPossible values: Time in milliseconds the user is willing to wait for a quote from the relay.
Use 0 to request the fastest available quote.
3000Unique client session identifier.
session_abc123Confidentiality mode for this quote (defaults to public):
-
public- the swap is settled on public Intents rails. -
basic/advanced- the swap is settled on Confidential Intents rails.
publicPossible values: Amount to swap as the base amount, in the smallest unit of the currency. It is interpreted as input or output based on swapType.
1000ID of the origin asset.
nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.nearID of the destination asset.
nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.nearSlippage tolerance for the swap in basis points (1/100th of a percent), e.g. 100 for 1%.
100Address used for refunds.
0x2527D02599Ba641c19FEa793cD0F167589a0f10DType of refund address:
-
ORIGIN_CHAIN- assets are refunded to therefundToaddress on the origin chain. -
INTENTS- assets are refunded to therefundToIntents account. -
CONFIDENTIAL_INTENTS- assets are refunded to therefundToConfidential Intents account. On Confidential Intents, 1Click settles refunds via signed transfer intent rather than direct token transfer.
ORIGIN_CHAINPossible values: Recipient address. The format must match recipientType.
13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRKType of recipient address:
-
DESTINATION_CHAIN- assets are transferred to the chain ofdestinationAsset. -
INTENTS- assets are transferred to an account inside Intents. -
CONFIDENTIAL_INTENTS- assets are transferred to therecipientaccount inside Confidential Intents. On Confidential Intents, 1Click settles swap output via signed transfer intent rather than direct token transfer.
DESTINATION_CHAINPossible values: EVM address of a transfer recipient in a virtual chain
"0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C"EVM address of a refund recipient in a virtual chain
"0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C"Timestamp in ISO format indicating when refunds begin if the swap is not completed by then. If omitted, a default deadline is applied.
2019-08-24T14:15:22ZAddresses of connected wallets.
["0x123...","0x456..."]Quote successfully generated
Quote successfully generated
Timestamp in ISO format used to derive the deposit address for this quote.
2019-08-24T14:15:22Z1Click service signature confirming the quote for the specific deposit address.
<string>Unique identifier for request tracing and debugging.
550e8400-e29b-41d4-a716-446655440000Default Response
Application key is not assigned
Rate limit exceeded
Internal Server Error - Failed to get a quote service or missing deposit address
POST /api/quote/{apiKey} HTTP/1.1
Host: intents-api.aurora.dev
Content-Type: application/json
Accept: */*
Content-Length: 782
{
"dry": true,
"swapType": "EXACT_INPUT",
"depositType": "ORIGIN_CHAIN",
"depositMode": "SIMPLE",
"quoteWaitingTimeMs": 3000,
"sessionId": "session_abc123",
"confidentiality": "public",
"amount": "1000",
"originAsset": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
"destinationAsset": "nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near",
"slippageTolerance": 100,
"refundTo": "0x2527D02599Ba641c19FEa793cD0F167589a0f10D",
"refundType": "ORIGIN_CHAIN",
"recipient": "13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRK",
"recipientType": "DESTINATION_CHAIN",
"virtualChainRecipient": "\"0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C\"",
"virtualChainRefundRecipient": "\"0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C\"",
"deadline": "2019-08-24T14:15:22Z",
"connectedWallets": [
"0x123...",
"0x456..."
]
}{
"timestamp": "2019-08-24T14:15:22Z",
"signature": "<string>",
"correlationId": "550e8400-e29b-41d4-a716-446655440000",
"quoteRequest": {
"dry": true,
"swapType": "EXACT_INPUT",
"depositType": "ORIGIN_CHAIN",
"depositMode": "SIMPLE",
"quoteWaitingTimeMs": 3000,
"sessionId": "session_abc123",
"confidentiality": "public",
"amount": "1000",
"originAsset": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
"destinationAsset": "nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near",
"slippageTolerance": 100,
"refundTo": "0x2527D02599Ba641c19FEa793cD0F167589a0f10D",
"refundType": "ORIGIN_CHAIN",
"recipient": "13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRK",
"recipientType": "DESTINATION_CHAIN",
"virtualChainRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"virtualChainRefundRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"deadline": "2019-08-24T14:15:22Z",
"connectedWallets": [
"0x123...",
"0x456..."
],
"referral": "referral",
"appFees": [
{
"recipient": "recipient.near",
"fee": 100
}
],
"customRecipientMsg": "smart-contract-recipient.near"
},
"quote": {
"timeEstimate": 120,
"deadline": "2025-03-04T15:00:00Z",
"timeWhenInactive": "2025-03-04T15:00:00Z",
"depositAddress": "0x76b4c56085ED136a8744D52bE956396624a730E8",
"depositMemo": "1111111",
"chainDepositAddresses": [
{
"blockchain": "near",
"address": "0x76b4c56085ED136a8744D52bE956396624a730E8",
"memo": "1111111"
}
],
"amountIn": "1000000",
"amountInFormatted": "1",
"amountInUsd": "1",
"minAmountIn": "995000",
"maxAmountIn": "1005000",
"amountOut": "9950000",
"amountOutFormatted": "9.95",
"amountOutUsd": "9.95",
"minAmountOut": "9900000",
"refundFee": "1000",
"withdrawFee": "1000",
"virtualChainRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"virtualChainRefundRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"customRecipientMsg": "smart-contract-recipient.near"
}
}Last updated
