Get all orders fill/cancel events with cursor pagination
Retrieves all fill/cancel events with cursor-based pagination. Events are sorted by createDateTime DESC, id DESC.
Supported on: Ethereum Base BNB Chain Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon
Parameters
chain
* number path limit
integer querylimit to get events, max 500
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
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/orderbook/v4.1/{chain}/events';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
cursor:
'eyJjcmVhdGVEYXRlVGltZSI6IjIwMjUtMDEtMThUMTQ6MjM6MzAuODIyWiIsImlkIjo0MjM0NTY3ODkwfQ',
},
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 events
items
GetEventsV4Response object id
* number network
* number logId
* string version
* number action
* string orderHash
* string taker
* string remainingMakerAmount
* string transactionHash
* string blockNumber
* number createDateTime
* 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
{
"meta": {
"hasMore": true,
"nextCursor": "eyJhY3Rpdml0eURhdGUiOiIyMDIzLTEwLTE5VDE0OjAzOjI3LjUwMFoiLCJvcmRlckhhc2giOiIweDBkOTIwNzllMzgyOGYxZGQ2ZTQ4MTI2OWUwZDkxMmU2MGQwNGE1OGEwM2EyYzFmMDUyOWVkMTIwY2U2YmEwYmMifQ==",
"count": 150
},
"items": [
{
"id": 0,
"network": 0,
"logId": "string",
"version": 0,
"action": "string",
"orderHash": "string",
"taker": "string",
"remainingMakerAmount": "string",
"transactionHash": "string",
"blockNumber": 0,
"createDateTime": "string"
}
]
}