Submit a signed Fusion order
Submits a single signed limit order to the Fusion orderbook. The order will be validated and made available to resolvers for execution. Requires a valid EIP-712 signature from the order maker.
Supported on: Ethereum Base Solana BNB Chain Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea Sonic
Parameters
chain
* number pathRequest Body
Signed Fusion order ready for submission to the orderbook
order
* any Gasless order data
allOf[0]
OrderInput object Limit order structure for Fusion protocol
salt
* string Unique salt value to differentiate orders with same parameters
makerAsset
* string Address of the maker asset
takerAsset
* string Address of the taker asset
maker
* string An address of the maker (wallet or contract address)
receiver
string An address of the wallet or contract who will receive filled amount
makingAmount
* string Order maker's token amount
takingAmount
* string Order taker's token amount
makerTraits
string Includes some flags like, allow multiple fills, is partial fill allowed or not, price improvement, nonce, deadline etc
signature
* string Signature of the gasless order typed data (using signTypedData_v4)
extension
* string An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.Lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash
quoteId
* string Quote id of the quote with presets
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
34
35
36
37
38
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/fusion/relayer/v2.0/{chain}/order/submit';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
order: {
salt: 'string',
makerAsset: 'string',
takerAsset: 'string',
maker: 'string',
receiver: '0x0000000000000000000000000000000000000000',
makingAmount: 'string',
takingAmount: 'string',
makerTraits: '0',
},
signature: 'string',
extension: '0x',
quoteId: 'string',
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
201
400
403
409
500
201 response doesn’t have payload.