Get limit orders history by address (Cursor Pagination)
Retrieves limit orders history for a specific address with cursor-based pagination
Supported on: Ethereum Base BNB Chain Avalanche Cronos ZKsync Gnosis HyperEVM Arc Monad Optimism Polygon Linea Sonic Unichain Robinhood Chain Arbitrum
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.
makerAsset
string queryAddress of the maker asset
takerAsset
string queryAddress of the taker asset
withAsset
string queryfilter either by maker or taker asset
timestampFrom
number querytimestampFrom in milliseconds for interval [timestampFrom, timestampTo)
timestampTo
number querytimestampTo in milliseconds for interval [timestampFrom, timestampTo)
cursor
string querybase64 representation of the cursor
timeSort
string (Enum)querySort orders by time. Supported values: asc, desc. Default: desc
sortBy
string (Enum)queryRequest 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
31
32
33
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/orderbook/v4.1/{chain}/address/{address}/history';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
statuses: '1,2,3',
makerAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
takerAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
withAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
timestampFrom: 1791539572097,
timestampTo: 1791539572097,
cursor:
'eyJpZCI6IjB4ZDY3NDVhNmJiZGYxZjFhYzczYzRmN2JlZjU0ZWNmYzU2ZmVlMWFjYzkwMGJkZTliMDBkZDE3ZjVmMTlhM2M5IiwicmVtYWluaW5nTWFrZXJBbW91bnQiOiI1MDAwMDAwMDAwMDAwMDAwMDAwMCIsImNyZWF0ZURhdGVUaW1lIjoiMjAyMy0wNi0yNlQxMDowMDowNi40NjVaIn0=',
},
paramsSerializer: {
indexes: null,
},
};
try {
const response = await axios.get(url, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
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
GetMakerLimitOrdersHistoryV4_1Response 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)
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
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
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
46
47
48
49
50
51
52
53
{
"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,
"orderStatus": 1,
"events": [
{
"id": 1,
"version": 4,
"action": "fill",
"orderHash": "0xd6745a6bbdf1f1ac73c4f7bef54ecfc56fee1acc900bde9b00dd17f5f19a37c9",
"taker": "0x1234567890123456789012345678901234567890",
"amount": "500000000000000000",
"transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"blockNumber": 12345678,
"createDateTime": "2023-06-26T10:30:06.465Z"
}
],
"statusInfo": {
"statuses": [],
"data": {
"loss": 15.5
}
}
}
]
}