Get quote for token swap
Retrieves a quote for swapping tokens with fusion mode. Returns preset configurations, slippage parameters, and a unique quote ID for order building.
Supported on: Ethereum Base Solana BNB Chain Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism
Parameters
chain
* number path enableEstimate
* boolean queryEnable estimation from 1inch pathfinder and generate quote ID. Set to true to enable order building
fee
integer queryPartner fee in basis points (bps). 100 bps = 1%. Requires fee receiver to be configured
isPermit2
boolean queryWhether the permit is in Permit2 format (Uniswap Permit2 standard)
permit
string queryEIP-2612 permit signature for gasless token approval (hex string)
walletAddress
* string queryEthereum address of the wallet or contract that will create and sign the Fusion order
amount
* string queryAmount of source token to swap (in token's smallest unit, e.g., wei for ETH)
toTokenAddress
* string queryDestination token contract address (ERC20 or native token wrapper)
fromTokenAddress
* string querySource token contract address (ERC20 or native token wrapper)
Request Body
This request doesn’t have any request body.
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/fusion/quoter/v2.0/{chain}/quote/receive';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
permit: '0x',
walletAddress: '0x0000000000000000000000000000000000000000',
amount: '100000000000000000',
toTokenAddress: '0x6b175474e89094c44da98b954eedeac495271d0f',
fromTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
404
500
Quote response containing swap parameters, presets, and pricing information for creating a Fusion order
quoteId
* object Current generated quote id, should be passed with order
fromTokenAmount
* string Amount of source token to swap
toTokenAmount
* string Expected amount of destination token to receive
feeToken
* object Destination token address
fee
*ResolverFee object Resolver fee configuration including receiver address and basis points
receiver
* string Resolver fee receiver
bps
* number Resolver fee bps
whitelistDiscountPercent
* number Discount percentage for whitelisted resolvers
integratorFee
* number Integrator fee in basis points
integratorFeeReceiver
string Address of integrator fee receiver
presets
* any Various preset types which user can choose when using Fusion
allOf[0]
QuotePresetsClass object Collection of preset configurations for different execution strategies
fast
* any Fast preset type
allOf[0]
PresetClass object Auction preset configuration with timing, amounts, and execution parameters
bankFee
* string Bank fee amount in token units
auctionDuration
* number Duration of the auction in seconds
startAuctionIn
* number Delay before auction starts in seconds
initialRateBump
* number Initial rate bump percentage (in basis points)
auctionStartAmount
* string Starting amount for the auction
startAmount
* string auction start amount taking into account gas bump
auctionEndAmount
* string Ending amount for the auction
exclusiveResolver
* object Address of exclusive resolver, if any
tokenFee
* string Token fee amount
estP
* number Estimated probability of execution
points
* array Auction price curve points
items
AuctionPointClass object Point in the auction price curve defining rate changes over time
delay
* number Delay in seconds from previous point or auction start time
coefficient
* number Rate bump coefficient from order min taker amount
allowPartialFills
* boolean Whether partial fills are allowed
allowMultipleFills
* boolean Whether multiple fills are allowed
gasCost
*GasCostConfigClass object Gas cost estimation parameters for order execution
gasBumpEstimate
* number Estimated gas bump for execution
gasPriceEstimate
* string Estimated gas price in wei
medium
* any Medium preset type
allOf[0]
PresetClass object Auction preset configuration with timing, amounts, and execution parameters
bankFee
* string Bank fee amount in token units
auctionDuration
* number Duration of the auction in seconds
startAuctionIn
* number Delay before auction starts in seconds
initialRateBump
* number Initial rate bump percentage (in basis points)
auctionStartAmount
* string Starting amount for the auction
startAmount
* string auction start amount taking into account gas bump
auctionEndAmount
* string Ending amount for the auction
exclusiveResolver
* object Address of exclusive resolver, if any
tokenFee
* string Token fee amount
estP
* number Estimated probability of execution
points
* array Auction price curve points
items
AuctionPointClass object Point in the auction price curve defining rate changes over time
delay
* number Delay in seconds from previous point or auction start time
coefficient
* number Rate bump coefficient from order min taker amount
allowPartialFills
* boolean Whether partial fills are allowed
allowMultipleFills
* boolean Whether multiple fills are allowed
gasCost
*GasCostConfigClass object Gas cost estimation parameters for order execution
gasBumpEstimate
* number Estimated gas bump for execution
gasPriceEstimate
* string Estimated gas price in wei
slow
* any Slow preset type
allOf[0]
PresetClass object Auction preset configuration with timing, amounts, and execution parameters
bankFee
* string Bank fee amount in token units
auctionDuration
* number Duration of the auction in seconds
startAuctionIn
* number Delay before auction starts in seconds
initialRateBump
* number Initial rate bump percentage (in basis points)
auctionStartAmount
* string Starting amount for the auction
startAmount
* string auction start amount taking into account gas bump
auctionEndAmount
* string Ending amount for the auction
exclusiveResolver
* object Address of exclusive resolver, if any
tokenFee
* string Token fee amount
estP
* number Estimated probability of execution
points
* array Auction price curve points
items
AuctionPointClass object Point in the auction price curve defining rate changes over time
delay
* number Delay in seconds from previous point or auction start time
coefficient
* number Rate bump coefficient from order min taker amount
allowPartialFills
* boolean Whether partial fills are allowed
allowMultipleFills
* boolean Whether multiple fills are allowed
gasCost
*GasCostConfigClass object Gas cost estimation parameters for order execution
gasBumpEstimate
* number Estimated gas bump for execution
gasPriceEstimate
* string Estimated gas price in wei
custom
any Custom preset type
allOf[0]
PresetClass object Auction preset configuration with timing, amounts, and execution parameters
bankFee
* string Bank fee amount in token units
auctionDuration
* number Duration of the auction in seconds
startAuctionIn
* number Delay before auction starts in seconds
initialRateBump
* number Initial rate bump percentage (in basis points)
auctionStartAmount
* string Starting amount for the auction
startAmount
* string auction start amount taking into account gas bump
auctionEndAmount
* string Ending amount for the auction
exclusiveResolver
* object Address of exclusive resolver, if any
tokenFee
* string Token fee amount
estP
* number Estimated probability of execution
points
* array Auction price curve points
items
AuctionPointClass object Point in the auction price curve defining rate changes over time
delay
* number Delay in seconds from previous point or auction start time
coefficient
* number Rate bump coefficient from order min taker amount
allowPartialFills
* boolean Whether partial fills are allowed
allowMultipleFills
* boolean Whether multiple fills are allowed
gasCost
*GasCostConfigClass object Gas cost estimation parameters for order execution
gasBumpEstimate
* number Estimated gas bump for execution
gasPriceEstimate
* string Estimated gas price in wei
settlementAddress
* string settlement contract address
nativeOrderFactoryAddress
string Factory for native order submission, only present when src asset is native
nativeOrderImplAddress
string Implementation for `nativeOrderFactoryAddress`, only present when src asset is native
whitelist
* array current executors whitelist addresses
items
string recommended_preset
* string (Enum)suggested to use this preset
fast
medium
slow
custom
suggested
* boolean is it suggested to use Fusion
prices
*TokenPairValue object Token pair prices in various currencies
usd
*PairCurrencyValue object Token pair price values in a specific currency
fromToken
* string Price or volume of the source token
toToken
* string Price or volume of the destination token
volume
*TokenPairValue object Token pair prices in various currencies
usd
*PairCurrencyValue object Token pair price values in a specific currency
fromToken
* string Price or volume of the source token
toToken
* string Price or volume of the destination token
source
string Server-resolved source tracking code. SDK clients should use this for order building.
surplusFee
* number Surplus fee in percent
JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"quoteId": null,
"fromTokenAmount": "string",
"toTokenAmount": "string",
"feeToken": null,
"fee": {
"receiver": "string",
"bps": 0,
"whitelistDiscountPercent": 0
},
"integratorFee": 0,
"integratorFeeReceiver": "string",
"integratorFeeShare": 0,
"presets": {
"fast": {
"bankFee": "string",
"auctionDuration": 0,
"startAuctionIn": 0,
"initialRateBump": 0,
"auctionStartAmount": "string",
"startAmount": "string",
"auctionEndAmount": "string",
"exclusiveResolver": null,
"tokenFee": "string",
"estP": 0,
"points": [
{
"delay": 0,
"coefficient": 0
}
],
"allowPartialFills": false,
"allowMultipleFills": false,
"gasCost": {
"gasBumpEstimate": 0,
"gasPriceEstimate": "string"
}
},
"medium": {
"bankFee": "string",
"auctionDuration": 0,
"startAuctionIn": 0,
"initialRateBump": 0,
"auctionStartAmount": "string",
"startAmount": "string",
"auctionEndAmount": "string",
"exclusiveResolver": null,
"tokenFee": "string",
"estP": 0,
"points": [
{
"delay": 0,
"coefficient": 0
}
],
"allowPartialFills": false,
"allowMultipleFills": false,
"gasCost": {
"gasBumpEstimate": 0,
"gasPriceEstimate": "string"
}
},
"slow": {
"bankFee": "string",
"auctionDuration": 0,
"startAuctionIn": 0,
"initialRateBump": 0,
"auctionStartAmount": "string",
"startAmount": "string",
"auctionEndAmount": "string",
"exclusiveResolver": null,
"tokenFee": "string",
"estP": 0,
"points": [
{
"delay": 0,
"coefficient": 0
}
],
"allowPartialFills": false,
"allowMultipleFills": false,
"gasCost": {
"gasBumpEstimate": 0,
"gasPriceEstimate": "string"
}
},
"custom": {
"bankFee": "string",
"auctionDuration": 0,
"startAuctionIn": 0,
"initialRateBump": 0,
"auctionStartAmount": "string",
"startAmount": "string",
"auctionEndAmount": "string",
"exclusiveResolver": null,
"tokenFee": "string",
"estP": 0,
"points": [
{
"delay": 0,
"coefficient": 0
}
],
"allowPartialFills": false,
"allowMultipleFills": false,
"gasCost": {
"gasBumpEstimate": 0,
"gasPriceEstimate": "string"
}
}
},
"settlementAddress": "string",
"nativeOrderFactoryAddress": "string",
"nativeOrderImplAddress": "string",
"whitelist": ["string"],
"recommended_preset": "fast",
"suggested": false,
"prices": {
"usd": {
"fromToken": "string",
"toToken": "string"
}
},
"volume": {
"usd": {
"fromToken": "string",
"toToken": "string"
}
},
"source": "string",
"surplusFee": 0
}