Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions evm/activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,33 @@ If you request `?chain_ids=1,9999,10`, the API returns activity for chains 1 and
Check the [Supported Chains](/evm/supported-chains) page to see which chains are currently supported for the Activity endpoint.
</Tip>

## Token Filtering
## Filtering

We include all the data needed for custom filtering in the responses, allowing you to implement your own filtering logic. For a detailed explanation of our approach, see our [Token Filtering](/token-filtering) guide.
You can filter activities server-side using the following query parameters:

- **`token_address`** — Filter by token contract address. Accepts a single address or a comma-separated list. For example, pass the USDC contract address to return only USDC-related activity, or pass multiple addresses to match any of them. Note: swap and call activities do not have a single token address, so they are always excluded when this filter is set. Native transfers are also excluded since they have no token contract.
- **`activity_type`** — Filter by activity type. Accepts a single value or a comma-separated list. Accepted values: `send`, `receive`, `mint`, `burn`, `swap`, `approve`, `call`.
- **`asset_type`** — Filter by asset standard. Accepts a single value or a comma-separated list. Accepted values: `native`, `erc20`, `erc721`, `erc1155`. Use `native` to include native token transfers (e.g. ETH). Contract call activities have no asset type and are excluded when this filter is set.

All filters are optional and can be combined. For example, to get only native token receives:

```
GET /v1/evm/activity/{address}?activity_type=receive&asset_type=native
```

To get only sends and receives (multi-value):

```
GET /v1/evm/activity/{address}?activity_type=send,receive
```

Or to get only USDC sends:

```
GET /v1/evm/activity/{address}?token_address=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&activity_type=send
```

For additional client-side filtering, we include all the data needed in the responses. See our [Token Filtering](/token-filtering) guide for more details.

## Compute Unit Cost

Expand Down
30 changes: 30 additions & 0 deletions evm/openapi/activity.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,36 @@
"maximum": 100,
"default": 20
}
},
{
"name": "token_address",
"in": "query",
"description": "Filter activities by token contract address. Provide a single address (e.g. `?token_address=0xa0b8...`) or a comma-separated list (e.g. `?token_address=0xa0b8...,0xdac1...`). Only activities involving the specified token(s) will be returned. Swap and call activities are excluded when this filter is set, as they do not have a single token address. Native transfers are also excluded since they have no token contract.",
"required": false,
"schema": {
"type": "string"
},
"example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
{
"name": "activity_type",
"in": "query",
"description": "Filter activities by type. Provide a single value (e.g. `?activity_type=send`) or a comma-separated list (e.g. `?activity_type=send,receive`). Only activities matching one of the specified types will be returned.",
"required": false,
"schema": {
"type": "string"
},
"example": "send,receive"
},
{
"name": "asset_type",
"in": "query",
"description": "Filter activities by asset standard. Provide a single value (e.g. `?asset_type=native`) or a comma-separated list (e.g. `?asset_type=erc20,erc721`). Use `native` to include native token transfers (e.g. ETH). Contract call activities have no asset type and are excluded when this filter is set.",
"required": false,
"schema": {
"type": "string"
},
"example": "erc20"
}
],
"responses": {
Expand Down