Get orders count by specified filters
Supported on: Ethereum Base BNB Chain Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea
Parameters
chain
* number path 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.
takerAsset
string queryAddress of the taker asset
makerAsset
string queryAddress of the maker asset
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
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/orderbook/v4.1/{chain}/count';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
statuses: '1,2,3',
takerAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
makerAsset: '0x1234567890ABCDEF1234567890ABCDEF12345678',
},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
400
default
count
* number The count of limit order by specified filter params
JSON
Copy
1
2
3
4
{
"count": "124"
}