rectangle-apiRequest a quote

post

Request a swap quote based on input parameters such as the assets, amount, slippage tolerance, and recipient/refund information.

Path parameters
apiKeystringRequired

API key generated at https://studio.aurora.dev

Body
drybooleanRequired

Flag indicating whether this is a dry run request.

If true, the response will NOT contain the following fields:

  • depositAddress

  • timeWhenInactive

  • deadline

Example: true
swapTypestring · enumRequired

How 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 minAmountIn and maxAmountIn.

    • If the input is above maxAmountIn, the swap is processed and the excess is refunded to refundTo after 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.

    • slippage applies both to amountOut and amountIn and defines an acceptable range (minAmountIn and minAmountOut).

    • Any amount higher than 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.

    • If deposits exceed the upper bound, the swap is still processed.

Example: EXACT_INPUTPossible values:
depositTypestring · enumRequired

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.

Example: ORIGIN_CHAINPossible values:
depositModestring · enumOptional

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 the memo together with depositAddress for the swap to work.

Example: SIMPLEPossible values:
quoteWaitingTimeMsnumberOptional

Time in milliseconds the user is willing to wait for a quote from the relay.

Use 0 to request the fastest available quote.

Example: 3000
sessionIdstringOptional

Unique client session identifier.

Example: session_abc123
amountstringRequired

Amount to swap as the base amount, in the smallest unit of the currency. It is interpreted as input or output based on swapType.

Example: 1000
originAssetstringRequired

ID of the origin asset.

Example: nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near
destinationAssetstringRequired

ID of the destination asset.

Example: nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near
slippageTolerancenumberRequired

Slippage tolerance for the swap in basis points (1/100th of a percent), e.g. 100 for 1%.

Example: 100
refundTostringRequired

Address used for refunds.

Example: 0x2527D02599Ba641c19FEa793cD0F167589a0f10D
refundTypestring · enumRequired

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.

Example: ORIGIN_CHAINPossible values:
recipientstringRequired

Recipient address. The format must match recipientType.

Example: 13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRK
recipientTypestring · enumRequired

Type of recipient address:

  • DESTINATION_CHAIN - assets are transferred to the chain of destinationAsset.

  • INTENTS - assets are transferred to an account inside Intents.

Example: DESTINATION_CHAINPossible values:
virtualChainRecipientstringOptional

EVM address of a transfer recipient in a virtual chain

Example: "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C"
virtualChainRefundRecipientstringOptional

EVM address of a refund recipient in a virtual chain

Example: "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C"
Responses
chevron-right
200

Quote successfully generated

application/json

Quote successfully generated

timestampstringRequired

Timestamp in ISO format used to derive the deposit address for this quote.

Example: 2019-08-24T14:15:22Z
signaturestringRequired

1Click service signature confirming the quote for the specific deposit address.

Example: <string>
correlationIdstringRequired

Unique identifier for request tracing and debugging.

Example: 550e8400-e29b-41d4-a716-446655440000
post
/api/quote/{apiKey}

Last updated