Get quote details based on input data with fee support (v1.2)
Supported on: Ethereum Base Solana BNB Chain Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon
Parameters
srcChain
* number queryId of source chain
dstChain
* number queryId of destination chain
srcTokenAddress
* string queryAddress of "SOURCE" token in source chain
dstTokenAddress
* string queryAddress of "DESTINATION" token in destination chain
amount
* string queryAmount to take from "SOURCE" token to get "DESTINATION" token
walletAddress
* string queryAn address of the wallet or contract in source chain who will create Fusion order
enableEstimate
* boolean queryif enabled then get estimation from 1inch swap builder and generates quoteId, by default is false
isPermit2
string querypermit2 allowance transfer encoded call
fee
number queryIntegrator fee in basis points (1 = 0.01%)
permit
string querypermit, user approval sign
feeReceiver
string queryAddress to receive integrator fee (required when fee is provided)
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
31
32
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/fusion-plus/quoter/v1.2/quote/receive';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
srcChain: 1,
dstChain: 137,
srcTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
dstTokenAddress: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
amount: '100000000000000000',
walletAddress: '0x0000000000000000000000000000000000000000',
enableEstimate: false,
},
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
default
200 response doesn’t have payload.