Returns history event with search filter
Supported on: Ethereum Base BNB Chain Gnosis HyperEVM Arc Monad Optimism Polygon Sonic Unichain Robinhood Chain Arbitrum Avalanche Cronos ZKsync
Parameters
address
* string pathAccount address
Request Body
filter
*HistorySearchMultiFilterRootFilterDto object and
*HistorySearchMultiFilterRootAndDto object and
*SearchAndMultiFilterDto object from_time_ms
object to_time_ms
object chain_ids
array items
string transaction_types
array items
string token_addresses
array items
string chain_based_token_addresses
array items
string or
*SearchOrMultiFilterDto object chain_ids
array items
string transaction_types
array items
string chain_based_token_addresses
array items
string transaction_hash
UnifiedTransactionHash object from_or_to_address
UnifiedAccountAddress object limit
number 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
34
35
36
37
38
39
40
41
42
43
44
45
46
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/history/v2.0/history/{address}/search/events';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
filter: {
and: {
and: {
from_time_ms: null,
to_time_ms: null,
chain_ids: ['string'],
transaction_types: ['string'],
token_addresses: ['string'],
chain_based_token_addresses: ['string'],
},
or: {
chain_ids: ['string'],
transaction_types: ['string'],
chain_based_token_addresses: ['string'],
transaction_hash: {},
from_or_to_address: {},
},
},
limit: 0,
},
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
items
HistoryEventResponseDto object item
* object cache_counter
* number JSON
Copy
1
2
3
4
5
6
7
[
{
"item": null,
"cache_counter": 0
}
]