Build EVM order by given quoteId (v1.2)
Supported on: Ethereum Base Solana BNB Chain Gnosis Optimism Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync
Parameters
quoteId
* string queryId of the quote received from /receive
isMobile
boolean queryEnabled flag allows to save quote for Mobile History
Request Body
Request body for building an EVM order
secretsHashList
* array Array of secret hashes - keccak256(secret)[]
items
string permit
string EIP-2612 permit message
isPermit2
boolean Can be used with permit2
receiver
string A custom receiver address. Required for non-evm chains
preset
string (Enum)Preset for order price curve. By default: recommended preset from a quote
fast
slow
medium
custom
additionalAuctionStartDelay
number Additional auction start delay in seconds (useful for multisig wallets)
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
33
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/fusion-plus/quoter/v1.2/quote/build/evm';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
secretsHashList: [
'0x315b47a8c3780434b153667588db4ca628526e20000000000000000000000000',
],
permit: 'string',
isPermit2: false,
receiver: 'string',
preset: 'fast',
additionalAuctionStartDelay: 30,
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
default
200 response doesn’t have payload.