Get all data to perform a cancellation or withdrawal on public periods
Supported on: Ethereum Base Solana BNB Chain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea Sonic Unichain
Parameters
orderVersion
array queryFilter by order version(s). If not specified, returns orders of all versions.
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
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/fusion-plus/orders/v1.2/order/ready-to-execute-public-actions';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
default
Collection of public actions ready to be executed
actions
* array Actions allowed to be performed on public timelock periods
items
ReadyToExecutePublicAction object Public action that can be executed on a timelock period
action
* any Type of public action to execute
allOf[0]
PublicAction string (Enum)Type of public action to execute
withdraw
cancel
side
* any Side of the escrow (source or destination chain)
allOf[0]
EscrowEventSide string (Enum)Side of the escrow (source or destination chain)
src
dst
immutables
* any Chain's immutables to provide for execution
allOf[0]
Immutables object Immutable parameters of an escrow contract
orderHash
* string Order's hash 32 bytes hex sting
hashlock
* string keccak256(secret(idx))
maker
* string Maker's address which will receive tokens
taker
* string Escrow creation initiator address
token
* string Token to receive on specific chain
amount
* string Amount of token to receive
safetyDeposit
* string Security deposit in chain's native currency
timelocks
* string Encoded timelocks. To decode use: https://github.com/1inch/cross-chain-sdk/blob/master/src/cross-chain-order/time-locks/time-locks.ts
parameters
string Fee parameters encoded as bytes. Contains protocol and integrator fee amounts and recipients. Empty "0x" for legacy V1 orders without fee support.
chainId
* number Execute action on this chain
escrow
* string Escrow's address to perform public action
secret
string Presented only for withdraw action
srcAssetIsNative
boolean If src asset is native or no, exists for Solana orders only
JSON
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
{
"actions": [
{
"action": "withdraw",
"side": "src",
"immutables": {
"orderHash": "0x496755a88564d8ded6759dff0252d3e6c3ef1fe42b4fa1bbc3f03bd2674f1078",
"hashlock": "0x03f9ebf9075dfaae76c43b7443d07399609ffe24a5d435045fe4d3bf82d9fce4",
"maker": "0xe75eD6F453c602Bd696cE27AF11565eDc9b46B0D",
"taker": "0x00000000009E50a7dDb7a7B0e2ee6604fd120E49",
"token": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"amount": "1000000000000000000",
"safetyDeposit": "50000000000000000000",
"timelocks": "0x3000000020000000100000004000000030000000200000001",
"parameters": "0x"
},
"chainId": 1,
"escrow": "0xf1325353e081023520d44b7a24f72905ada3a080",
"secret": "0x496755a88564d8ded6759dff0252d3e6c3ef1fe42b4fa1bbc3f03bd2674f1078",
"srcAssetIsNative": false
}
]
}