> For the complete documentation index, see [llms.txt](https://docs-unified.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-unified.crypto-chief.com/api-reference/events.md). Agents can also search and read this documentation through its [MCP server](https://docs-unified.crypto-chief.com/~gitbook/mcp).

# Events

## Events

### Search past events

`POST /v1/events/search`

Past events matching an EventStream `selection` — the same filter object a subscription takes — in a block or time range. Use it to backfill what happened before a subscription started, or to test a selection on history before you subscribe.

The events are those an EventStream subscription with this selection would have delivered: the same `type`, `payload` and `id` (`occurrence_id`). A page is charged once for each network of the selection that answered ([Billing](https://docs-unified.crypto-chief.com/getting-started/billing.md)).

#### Body

| Field       | Type           | Required | Description                                                                                                                                               |
| ----------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `selection` | object         | Yes      | An EventStream [selection object](https://crypto-chief.gitbook.io/chief-event-stream/api/subscriptions#selection-object)                                  |
| `range`     | object         | Yes      | `{"from_block", "to_block"}` — block range `[from_block, to_block)`, one network; or `{"from", "to"}` — time range `[from, to)`, ISO 8601 or Unix seconds |
| `min_stage` | string         | No       | `found`, `confirmed` (default) or `final`                                                                                                                 |
| `order`     | string         | No       | `asc` (default) or `desc`                                                                                                                                 |
| `limit`     | integer        | No       | `1`–`1000`, default `1000`                                                                                                                                |
| `cursor`    | string \| null | No       | `next_cursor` of the previous page; send the same body with it                                                                                            |

#### `selection`

The fields and rules are those of EventStream subscriptions:

| Field                                   | Meaning                                                                                                                                                                                 |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `networks`                              | Network codes to search                                                                                                                                                                 |
| `types`                                 | Event types: `transfer.native`, `transfer.token`, `nft.transfer`, `token.approval`, `contract.event`, `contract.call`, `transaction.failed`, and the TRON and XRP Ledger protocol types |
| `addresses`                             | `{network, address}` pairs; transfers to or from them                                                                                                                                   |
| `assets`                                | `{network, kind, id}`; for transfer types, which assets to return                                                                                                                       |
| `directions`                            | `in`, `out`, `self`, relative to `addresses`                                                                                                                                            |
| `minimum_raw`, `include_zero`           | Smallest amount in base units; whether zero-amount transfers count                                                                                                                      |
| `contracts`, `events`, `calls`          | Contracts, ABI event specifications for `contract.event`, call specifications for `contract.call`                                                                                       |
| `actions`, `accounts`, `counterparties` | Filters of TRON and XRP Ledger protocol events                                                                                                                                          |

* The event types a network can search are in `capabilities.events_search.types` of [`GET /v1/networks`](https://docs-unified.crypto-chief.com/api-reference/networks.md).
* Lists of `{network, …}` entries apply per network, as in a subscription. `addresses` and `contracts`: a non-empty list returns events of the listed addresses or contracts only, so a network none of them names returns nothing; an empty list is no filter. `assets`: only events of the listed assets of each network are returned — a network with no listed asset, or an empty `assets` list, returns nothing. Every entry must name a network of `selection.networks`; otherwise `400`.
* A `selection` field a searched network does not support is `422 UNSUPPORTED_CAPABILITY` naming the field — never ignored silently.
* `watchlists` and `xpub_sources` are not searched (`422 UNSUPPORTED_CAPABILITY`): list the addresses in `addresses`.
* A block range longer than `capabilities.events_search.max_block_range` is `422 RANGE_TOO_LARGE` with `details.max`. `null` means no limit.
* On EVM networks a selection takes up to 100 contracts or assets per network; a search for token transfers or approvals with no addresses, contracts or assets covers at most 5,000 blocks. Beyond either, `422 RANGE_TOO_LARGE`.
* A range below `capabilities.transfers.history_from` is `422 HISTORY_OUT_OF_COVERAGE`.

#### Request

Incoming USDC to one address on Ethereum, in a block range:

```bash
curl -s -X POST "https://api-unified.crypto-chief.com/v1/events/search" \
  -H "X-API-Key: $CC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "selection": {
      "networks": ["ETH_MAINNET"],
      "types": ["transfer.token"],
      "addresses": [{ "network": "ETH_MAINNET", "address": "0x99887766554433221100ffeeddccbbaa99887766" }],
      "directions": ["in"],
      "assets": [{ "network": "ETH_MAINNET", "kind": "token", "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }],
      "minimum_raw": "1000000",
      "include_zero": false
    },
    "range": { "from_block": "23900000", "to_block": "23950000" },
    "min_stage": "final",
    "order": "asc",
    "limit": 1000
  }'
```

#### Response

```json
{
  "items": [
    {
      "id": "5a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b",
      "network": "ETH_MAINNET",
      "type": "transfer.token",
      "block": {
        "height": "23949041",
        "hash": "0x4a5b6c7d8e9f00112233445566778899aabbccddeeff00112233445566778899",
        "parent_hash": "0x394a5b6c7d8e9f00112233445566778899aabbccddeeff001122334455667788",
        "timestamp": "2026-11-29T06:25:48.000Z"
      },
      "transaction": {
        "hash": "0x8b4c9e12f5a603d7c891b234e567f890123456789abcdef0123456789abcdef0",
        "index": 58,
        "success": true,
        "fee": { "asset": "native", "raw": "690000000000000", "decimals": 18, "value": "0.00069" }
      },
      "stage": "final",
      "confirmations": "1072",
      "finality": { "basis": "finalized_tag", "economic": true },
      "payload": {
        "amount": { "decimals": 6, "raw": "25000000", "scale": null },
        "asset": {
          "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "decimals": 6,
          "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "kind": "token",
          "standard": "erc20",
          "symbol": "USDC",
          "token_id": null
        },
        "direction": "in",
        "from": "0x1f33a8b5c6d7e8f90123456789abcdef012393c9",
        "source": { "destination_tag": null, "kind": "log", "memo": null, "path": "log/0/erc20", "source_tag": null, "success": true },
        "to": "0x99887766554433221100ffeeddccbbaa99887766",
        "utxo": null
      }
    }
  ],
  "next_cursor": null,
  "snapshot": [
    { "network": "ETH_MAINNET", "height": "23950112", "hash": "0x5c1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a", "indexed_through": "23950110" }
  ],
  "networks": [
    {
      "network": "ETH_MAINNET",
      "status": "ok",
      "source": "index",
      "consistency": "block",
      "as_of_block": { "height": "23950112", "hash": "0x5c1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a" }
    }
  ]
}
```

#### The event object

A subset of the EventStream [event envelope](https://crypto-chief.gitbook.io/chief-event-stream/webhooks/event-envelope):

| Field                                | Description                                                                                                                             |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                                 | The `occurrence_id` of the event                                                                                                        |
| `network`, `type`                    | Network code and event type                                                                                                             |
| `block`, `transaction`               | As in the envelope; `transaction` is `null` for block-level events                                                                      |
| `stage`, `confirmations`, `finality` | [Confirmations and Finality](https://docs-unified.crypto-chief.com/getting-started/confirmations-and-finality.md)                       |
| `payload`                            | The [payload](https://crypto-chief.gitbook.io/chief-event-stream/webhooks/event-payloads) of the event type, as EventStream delivers it |

There is no `event_id`, `sequence`, `subscription_id` or `relation`: a search result is the current state of each occurrence, not a delivery.

### Not the EventStream event log

EventStream's `events/list` returns what your subscriptions captured in the last 30 days. Event search reads the networks themselves, for any range a network's history covers, whether or not a subscription existed. See [Event Backfill with an EventStream Selection](https://docs-unified.crypto-chief.com/guides/events-backfill.md).
