Submit a cross-chain order with fee support that resolvers will be able to fill
Submit a cross-chain order (EVM or Solana) with fee support that resolvers will be able to fill. The order must be properly signed and include all required fields.
Supported on: Ethereum Base BNB Chain Optimism Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis
Parameters
This request doesn’t have any parameters.
Request Body
oneOf[0]
EvmSignedOrderInput object Signed EVM cross-chain order ready for submission
order
* any Cross chain order data
allOf[0]
EvmOrderInput object EVM cross-chain order data structure
salt
* string Order entropy value
makerAsset
* string Source chain address of the maker asset
takerAsset
* string Destination chain address of the taker asset
maker
* string Source chain address of the maker (wallet or contract address)
receiver
* string Destination chain 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. See maker-traits.ts
srcChainId
* number Source chain id
signature
* string Signature of the cross chain order typed data (using signTypedData v4)
extension
* string An interaction call data. ABI encoded a 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. See escrow-extension.ts>
quoteId
* string Quote id of the quote with presets
secretHashes
array Secret Hashes, required for order with multiple fills allowed. keccak256(secret(idx))
items
string oneOf[1]
SolanaSubmittedOrderInput object Input for submitting a Solana cross-chain order
order
* any Order parameters
allOf[0]
CreateSolanaOrderParams object Parameters for creating a Solana cross-chain order
hashLock
* string 32-byte hash lock in hex
amount
* string Amount to swap
srcSafetyDeposit
* string Src safety deposit resolver submits in order to fill the order
dstSafetyDeposit
* string Dst safety deposit in string format
timeLocks
* string Encoded timelocks
expirationTime
* number Expiration time in timestamp format in seconds
assetIsNative
* boolean Is the swapped src asset native or not
dstAmount
* string Dst raw amount
dutchAuctionDataHash
* string Dutch auction data hash in hex format
cancellationAuctionDuration
* number Cancellation auction duration in seconds
allowMultipleFills
* boolean Allow multiple fills or no
salt
* string Order salt as string
maker
* string Maker account address
receiver
* string Receiver address on destination chain
srcMint
* string Src mint account address
dstMint
* string Token address of the destination asset
srcChainId
* number Source chain id
dstChainId
* number Destination chain id
auctionData
* any Auction configuration
allOf[0]
AuctionData object Auction configuration data
startTime
* number Start time of the auction in Unix timestamp format
duration
* number Duration of the auction in seconds
initialRateBump
* number Initial rate bump
pointsAndTimeDeltas
* array Auction price curve points
items
PointAndTimeDelta object Point in the auction price curve with rate bump and time delta
rateBump
* number Rate bump value at this point
timeDelta
* number Time delta in seconds from previous point
secretHashes
array Secret Hashes, required for order with multiple fills allowed. keccak256(secret(idx))
items
string 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
39
40
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/fusion-plus/relayer/v1.2/submit';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
order: {
salt: '42',
makerAsset: '0x0000000000000000000000000000000000000001',
takerAsset: '0x0000000000000000000000000000000000000001',
maker: '0x0000000000000000000000000000000000000001',
receiver: '0x0000000000000000000000000000000000000001',
makingAmount: '100000000000000000000',
takingAmount: '100000000000000000000',
makerTraits: '0',
},
srcChainId: 1,
signature: 'string',
extension: '0x',
quoteId: 'string',
secretHashes: ['string'],
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
201
201 response doesn’t have payload.