Build EVM order by given quoteId (v1.2)

POSThttps://api.1inch.com/fusion-plus/quoter/v1.2/quote/build/evm
Supported on:
EthereumBaseSolanaBNB ChainGnosisOptimismPolygonLineaSonicUnichainArbitrumAvalancheZKsync

Parameters

quoteId
* string query
isMobile
boolean query

Request Body

BuildEvmOrderBody object
secretsHashList
* array
items
string
permit
string
isPermit2
boolean
receiver
string
preset
string (Enum)
fast
slow
medium
custom
additionalAuctionStartDelay
number
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.

Did you find what you need?