GET Firm quote
Get signed order data for selling a ERC20 / native token. Submit the return data to Native router to execute swap.
Effectively recipient. This is the pay out address of the final swapped tokens. Funding address will always be the address calls Native Router.
0x1111111111111111111111111111111111111111Pattern: ^0x[a-fA-F0-9]{40}$Address of the end user that initiated the swap request. This is REQUIRED if you are an aggregator/widget/wallet. Optional for solvers.
0x1111111111111111111111111111111111111111Pattern: ^0x[a-fA-F0-9]{40}$Blockchain name, eg: ethereum, bsc, ... (refer to network name reference)
bscPossible values: Blockchain name, eg: ethereum, bsc, ... (refer to network name reference). Optional, defaults to src_chain.
bscPossible values: Address of the token to be sold
0x55d398326f99059ff775485246999027b3197955Pattern: ^0x[a-fA-F0-9]{40}$Address of the token to be bought
0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095cPattern: ^0x[a-fA-F0-9]{40}$Amount of token to be sold, in ether unit. (Skip if already passing amount_wei)
0Example: 100Amount of token to be sold, in wei unit. (Skip if already passing amount)
0The expiry time of the quote, in seconds. If omitted, the API key / pair default applies. Maximum 60 (error 171018).
60Example: 60Number in percent. For example, passing the value 5 means 5%, 0.1 means 0.1% slippage tolerance. If omitted, a pair-specific default from Native risk settings applies. Recommend passing 0.5 explicitly.
0.5The swap router version. Use 6 (latest). If omitted, version 4 is used for backwards compatibility only. Version 4 will be deprecated soon, so always pass version=6 explicitly.
6Whether to use multihop within all Native supported pairs for quoting. Recommended true for wallets/widgets.
falseWhen true, the response includes is_black_address indicating whether from_address or beneficiary_address is blacklisted. Omit or pass false to keep the default response (field not included).
falseExample: trueThe API key that was assigned to you by Native
Success
Quote source identifiers
Quote source identifiers used for this quote
Present only when show_blacklist_status=true. True if from_address or beneficiary_address is blacklisted.
There was an exception with the server
GET /swap-api-v2/v1/firm-quote?from_address=text&src_chain=ethereum&token_in=text&token_out=text HTTP/1.1
Host: v2.api.native.org
apiKey: text
Accept: */*
{
"success": true,
"orders": [
{
"pool": "text",
"signer": "text",
"recipient": "text",
"sellerToken": "text",
"buyerToken": "text",
"effectiveSellerTokenAmount": "text",
"sellerTokenAmount": "text",
"buyerTokenAmount": "text",
"deadlineTimestamp": 1,
"nonce": 1,
"quoteId": "text",
"multiHop": true,
"signature": "text",
"externalSwapCalldata": "text",
"amountOutMinimum": "text",
"widgetFee": {
"signer": "text",
"feeRecipient": "text",
"feeRate": 1
},
"widgetFeeSignature": "text"
}
],
"functionCall": "text",
"widgetFee": {
"signer": "text",
"feeRecipient": "text",
"feeRate": 1
},
"widgetFeeSignature": "text",
"recipient": "text",
"calldata": "text",
"amountIn": "text",
"amountOut": "text",
"amountOutBeforeFee": "text",
"toWrap": true,
"toUnwrap": true,
"fallbackSwapDataArray": [
"text"
],
"tokenTransferFeeOnPercent": 1,
"txRequest": {
"target": "text",
"calldata": "text",
"value": "text",
"function": "text"
},
"source": [
1
],
"quoteSource": [
1
],
"errorMessage": "text",
"router_version": "text",
"gasCostUsd": 1,
"estimateDuration": 1,
"bridge": {},
"amountInOffset": 1,
"amountOutMinimumOffset": 1,
"is_black_address": true
}Last updated