Get orders by address with cursor pagination
Retrieves orders by maker address with cursor-based pagination. Supports dynamic sorting by different fields.
Supported on: Ethereum Base BNB Chain Linea Sonic Unichain Robinhood Arbitrum Avalanche ZKsync Gnosis Optimism Polygon
Parameters
chain
* number path address
* string pathaddress in hexadecimal format
limit
integer queryNumber of limit orders to receive (default: 100, max: 500)
statuses
string queryA comma-separated list of statuses by which limit orders will be filtered. Valid statuses include: 1 - Valid orders, 2 - Temporarily invalid orders, 3 - Invalid orders.
sortBy
string (Enum)queryField to sort by (determines cursor fields)
makerAsset
string queryAddress of the maker asset
takerAsset
string queryAddress of the taker asset
cursor
string querybase64 representation of the cursor
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
26
27
28
29
30
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/orderbook/v4.1/{chain}/address/{address}';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
statuses: '1,2,3',
makerAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
takerAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
cursor:
'eyJjcmVhdGVEYXRlVGltZSI6IjIwMjUtMDEtMThUMTQ6MjM6MzAuODIyWiIsIm9yZGVySGFzaCI6IjB4NDk4NmRiZmM4NTFkZDE2OTYzOTU0MzA2YTY3YjAwMjdiN2QzYTgwODY5NTMxMTQ3ZjBhZWQ4NWZiZmVkZmJjIn0',
},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
meta
* any Cursor pagination metadata
allOf[0]
CursorMeta object hasMore
* boolean Whether there are more items available
nextCursor
string Next cursor for pagination
count
number Total count of items (if available)
items
* array Array of limit orders
items
GetMakerLimitOrdersV4Response object signature
string The cryptographic signature of the order, if the status is malicious then its not returned
orderHash
* string A unique identifier for the order
createDateTime
* string The date and time of order creation
remainingMakerAmount
* string The remaining amount
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
isMakerContract
* boolean Indicates if it is a maker contract
orderInvalidReason
* string Reason for order invalidity (null or string)
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
{
"meta": {
"hasMore": true,
"nextCursor": "eyJhY3Rpdml0eURhdGUiOiIyMDIzLTEwLTE5VDE0OjAzOjI3LjUwMFoiLCJvcmRlckhhc2giOiIweDBkOTIwNzllMzgyOGYxZGQ2ZTQ4MTI2OWUwZDkxMmU2MGQwNGE1OGEwM2EyYzFmMDUyOWVkMTIwY2U2YmEwYmMifQ==",
"count": 150
},
"items": [
{
"signature": "0xb8406ca79f313de982e927a4ca98a1751dc968ce56186854ec92a8004c701a2671b0b23bff972d81dcda081a7fcb768b1b2aa728987e005e8f47e3861a7550f71b",
"orderHash": "0xd6745a6bbdf1f1ac73c4f7bef54ecfc56fee1acc900bde9b00dd17f5f19a37c9",
"createDateTime": "2023-06-26T10:30:06.465Z",
"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",
"isMakerContract": false,
"orderInvalidReason": null
}
]
}