GET Firm quote
Get signed order data for selling a ERC20 / native token. Submit the return data to Native router to execute swap.
Address of the user that sells the token_in
^0x[a-fA-F0-9]{40}$Address of the user that receives the token_out. If empty, this address will be the same as from_address
^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.
^0x[a-fA-F0-9]{40}$Blockchain name, eg: ethereum, arbitrum, ... (refer to network name reference)
Blockchain name, eg: ethereum, arbitrum, ... (refer to network name reference)
Address of the token to be sold
^0x[a-fA-F0-9]{40}$Address of the token to be bought
^0x[a-fA-F0-9]{40}$Amount of token to be sold, in ether unit. (Skip if already passing amount_wei)
0Amount of token to be sold, in wei unit. (Skip if already passing amount)
0The expiry time of the quote, in seconds. Recommand 60 for all networks to avoid quoting errors.
0Number in percent. For example, passing the value 5 means 5%, 0.1 means 0.1% slippage tolerance. Recommend keeping default 0.5
0.5Timeout in milliseconds for the API request, useful in latency-sensitive applications.
2000Whether to use multihop within all Native supported pairs for quoting. Recommanded true for wallets/widgets.
falseThe API key that was assigned to you by Native
Success
There was an exception with the server
GET /swap-api-v2/v1/firm-quote?from_address=text&src_chain=ethereum&dst_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",
"toWrap": true,
"toUnwrap": true,
"fallbackSwapDataArray": [
"text"
],
"tokenTransferFeeOnPercent": 1,
"txRequest": {
"target": "text",
"calldata": "text",
"value": "text"
},
"source": "p0",
"errorMessage": "text",
"router_version": "text",
"gasCostUsd": 1,
"estimateDuration": 1,
"bridge": {},
"amountInOffset": 1,
"amountOutMinimumOffset": 1
}Last updated