Swaps
Swap quotes, approval checks, and executable calldata. The API prices and builds the transaction; your wallet signs and submits it.
The swap endpoints price a trade and hand back an unsigned transaction your wallet then submits — the API never holds funds or keys. The usual flow is: quote → check approval → fetch calldata → submit from your wallet. Some routes proxy the Uniswap Trading API behind the scenes.
Quote and approval
EXACT_INPUTPossible values: ^(0|[1-9][0-9]*)$^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$100falseFULLPossible values: Default Response
^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$^(0|[1-9][0-9]*)$^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$^(0|[1-9][0-9]*)$^(0|[1-9][0-9]*)$Default Response
Default Response
Default Response
Default Response
Default Response
Default Response
Default Response
POST /v1/{chain}/swaps/quote HTTP/1.1
Host: api.nftx.io
Content-Type: application/json
Accept: */*
Content-Length: 183
{
"type": "EXACT_INPUT",
"amount": "text",
"tokenIn": "text",
"tokenOut": "text",
"taker": "text",
"recipient": "text",
"slippageBps": 100,
"generatePermitAsTransaction": false,
"permitAmount": "FULL"
}{
"chainId": 1,
"requestId": "text",
"routing": "text",
"quoteId": "text",
"type": "EXACT_INPUT",
"tokenIn": "text",
"tokenOut": "text",
"amount": "text",
"taker": "text",
"recipient": "text",
"slippageBps": 1,
"input": {
"token": "text",
"amount": "text",
"maximumAmount": "text",
"minimumAmount": "text",
"recipient": "text"
},
"output": {
"token": "text",
"amount": "text",
"maximumAmount": "text",
"minimumAmount": "text",
"recipient": "text"
},
"gasFee": "text",
"gasFeeUsd": "text",
"priceImpact": 1,
"routeString": "text",
"routeSymbols": [
"text"
],
"permitTransaction": {
"to": "text",
"from": "text",
"data": "text",
"value": "text",
"chainId": 1,
"gasLimit": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text",
"gasPrice": "text"
},
"permitData": null,
"permitGasFee": "text",
"quote": null,
"issuedAt": "text",
"expiresAt": "text"
}^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$^(0|[1-9][0-9]*)$true^0x[a-fA-F0-9]{40}$Default Response
^(0|[1-9][0-9]*)$^(0|[1-9][0-9]*)$Default Response
Default Response
Default Response
Default Response
Default Response
Default Response
Default Response
POST /v1/{chain}/swaps/check-approval HTTP/1.1
Host: api.nftx.io
Content-Type: application/json
Accept: */*
Content-Length: 115
{
"walletAddress": "text",
"token": "text",
"amount": "text",
"includeGasInfo": true,
"tokenOut": "text",
"tokenOutChainId": 1
}{
"chainId": 1,
"requestId": "text",
"approval": {
"to": "text",
"from": "text",
"data": "text",
"value": "text",
"chainId": 1,
"gasLimit": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text",
"gasPrice": "text"
},
"cancel": {
"to": "text",
"from": "text",
"data": "text",
"value": "text",
"chainId": 1,
"gasLimit": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text",
"gasPrice": "text"
},
"gasFee": "text",
"cancelGasFee": "text"
}Calldata and plans
^0x[0-9a-fA-F]*$truetrueDefault Response
^(0|[1-9][0-9]*)$Default Response
Default Response
Default Response
Default Response
Default Response
Default Response
Default Response
POST /v1/{chain}/swaps/calldata HTTP/1.1
Host: api.nftx.io
Content-Type: application/json
Accept: */*
Content-Length: 321
{
"quote": null,
"permitData": null,
"signature": "text",
"expected": {
"requestId": "text",
"routing": "text",
"quoteId": "text",
"type": "EXACT_INPUT",
"amount": "text",
"tokenIn": "text",
"tokenOut": "text",
"taker": "text",
"recipient": "text",
"slippageBps": 1,
"expiresAt": "text"
},
"refreshGasPrice": true,
"simulateTransaction": true,
"deadline": 1
}{
"chainId": 1,
"requestId": "text",
"swap": {
"to": "text",
"from": "text",
"data": "text",
"value": "text",
"chainId": 1,
"gasLimit": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text",
"gasPrice": "text"
},
"gasFee": "text"
}^0x[a-fA-F0-9]{40}$1^0x[a-fA-F0-9]{40}$100Default Response
Default Response
Default Response
Default Response
POST /v1/{chain}/swaps/buy-from-pool/plan HTTP/1.1
Host: api.nftx.io
Content-Type: application/json
Accept: */*
Content-Length: 87
{
"collection": "text",
"tokenIds": [
"text"
],
"quantity": 1,
"taker": "text",
"slippageBps": 100
}{
"error": {
"code": "text",
"message": "text",
"details": null,
"requestId": "text"
}
}^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$^0x[a-fA-F0-9]{40}$100Default Response
Default Response
Default Response
Default Response
POST /v1/{chain}/swaps/cross-collection/plan HTTP/1.1
Host: api.nftx.io
Content-Type: application/json
Accept: */*
Content-Length: 100
{
"fromCollection": "text",
"toCollection": "text",
"tokenIds": [
"text"
],
"taker": "text",
"slippageBps": 100
}{
"error": {
"code": "text",
"message": "text",
"details": null,
"requestId": "text"
}
}Last updated
Was this helpful?