Get quote details based on input data
Supported on: Solana
Parameters
chain
* number path srcToken
* string queryAddress of "SOURCE" token
dstToken
* string queryAddress of "DESTINATION" token
amount
* number queryAmount to take from "SOURCE" token to get "DESTINATION" token
wallet
* string queryAn address of the account who will create Fusion order
enableEstimate
* boolean queryif enabled then get compute units estimation and generates quoteId, by default is false
slippage
number queryMax price drop from market return amount. In percents
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/v1.0/{chain}/quote';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
srcToken: 'SoNative11111111111111111111111111111111111',
dstToken: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
amount: '1000000000',
wallet: 'GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib',
enableEstimate: 'false',
slippage: '0.1',
},
paramsSerializer: {
indexes: null,
},
};
try {
const response = await axios.get(url, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200 response doesn’t have payload.