Get order by the specified order hash
Supported on: Ethereum Base BNB Chain Arbitrum Avalanche Cronos ZKsync Gnosis HyperEVM Arc Monad Optimism Polygon Linea Sonic Unichain Robinhood
Parameters
chain
* number path orderHash
* string pathOrderHash of the order
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
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/orderbook/v4.1/{chain}/order/{orderHash}';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
try {
const response = await axios.get(url, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
orderHash
* string A unique identifier for the order
createDateTime
* string The date and time of order creation
signature
* string The cryptographic signature of the order
orderStatus
* number (Enum)The status of the order (1: Valid, 2: TemporaryInvalid, 3: Invalid, 4: Unknown, 5: GnosisSafe, 6: Malicious)
1
2
3
4
5
6
remainingMakerAmount
* string The remaining amount for the maker
makerBalance
* string The balance of the maker
makerAllowance
* string The allowance granted to the maker
data
* any Data of the order
allOf[0]
LimitOrderV4Data object 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 (equals to Zero address for receiver == makerAddress)
makingAmount
* string Order maker's token amount
takingAmount
* string Order taker's token amount
salt
* string Some unique value. It is necessary to be able to create limit orders with the same parameters (so that they have a different hash), Lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash
extension
string An interaction call data. ABI encoded set of makerAssetSuffix, takerAssetSuffix, makingAmountGetter, takingAmountGetter, predicate, permit, preInteraction, postInteraction.If extension exists then lowest 160 bits of the order salt must be equal to the lowest 160 bits of the extension hash
makerTraits
string Includes some flags like, allow multiple fills, is partial fill allowed or not, price improvement, nonce, deadline etc
makerRate
* string The maker rate
takerRate
* string The taker rate
orderInvalidReason
* string Reason for order invalidity (null or string)
isMakerContract
* boolean Indicates if it is a maker contract
events
* array Array of events associated with this order
items
LimitOrderEventV4Response object id
* number Event ID
version
* number Order version
action
* string (Enum)Event action (fill or cancel)
fill
cancel
orderHash
* string Order hash
taker
* string Taker address
amount
* string amount of fill amount or remaining maker amount in case of cancel
transactionHash
* string Transaction hash
blockNumber
* number Block number
createDateTime
* string Event creation date and time
partialFillsAllowed
* boolean Whether the order can be filled partially (false means fill-or-kill)
statusInfo
* any Status information for the order including bad statuses and associated data
allOf[0]
OrderStatusInfoResponse object statuses
* array List of bad order statuses indicating issues with the order (0=InsufficientBalance, 1=NotApproved, 2=BadPrice, 3=Unknown). Empty array if no issues detected
items
number (Enum)0
1
2
3
data
* any Additional data associated with order statuses. Contains loss percentage when BadPrice (2) is present in statuses
allOf[0]
StatusDataResponse object loss
number Percentage loss on the order price vs market. Only present when BadPrice status applies
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"orderHash": "0xd6745a6bbdf1f1ac73c4f7bef54ecfc56fee1acc900bde9b00dd17f5f19a37c9",
"createDateTime": "2023-06-26T10:30:06.465Z",
"signature": "0xb8406ca79f313de982e927a4ca98a1751dc968ce56186854ec92a8004c701a2671b0b23bff972d81dcda081a7fcb768b1b2aa728987e005e8f47e3861a7550f71b",
"orderStatus": 1,
"remainingMakerAmount": "809906760854554700000000000000",
"makerBalance": "280674481722926709367228622156",
"makerAllowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"data": {
"makerAsset": "string",
"takerAsset": "string",
"maker": "string",
"receiver": "0x0000000000000000000000000000000000000000",
"makingAmount": "string",
"takingAmount": "string",
"salt": "string",
"extension": "0x",
"makerTraits": "0"
},
"makerRate": "0.000000000123471003",
"takerRate": "8099067608.545547000000000000",
"orderInvalidReason": null,
"isMakerContract": false,
"events": [
{
"id": 1,
"version": 4,
"action": "fill",
"orderHash": "0xd6745a6bbdf1f1ac73c4f7bef54ecfc56fee1acc900bde9b00dd17f5f19a37c9",
"taker": "0x1234567890123456789012345678901234567890",
"amount": "500000000000000000",
"transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"blockNumber": 12345678,
"createDateTime": "2023-06-26T10:30:06.465Z"
}
],
"partialFillsAllowed": true,
"statusInfo": {
"statuses": [],
"data": {
"loss": 15.5
}
}
}