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

# General Information

**EventStream** watches blockchains and sends the events of your subscriptions to your systems: signed HTTPS webhooks, Telegram, Slack, Discord, PagerDuty, email, S3, PostgreSQL, Kafka or ClickHouse. Event types include transfers, contract events, contract calls, failed transactions and new blocks.

A **subscription** sets what to catch: networks, event types, addresses or contracts, and confirmation stages. Matching events go to the subscription's **sinks**. With `delivery_policy.mode` set to `"shadow"`, they are recorded and not sent. A delivery is attempted up to `12` times within `24` hours ([Retries and Ordering](https://crypto-chief.gitbook.io/chief-event-stream/webhooks/retries-and-ordering.md)). [Sink Types](https://crypto-chief.gitbook.io/chief-event-stream/sinks/overview.md) compares the sink kinds.

## Base URL

```
https://api-eventstream.crypto-chief.com/v1/<operation>
```

Every operation is a `POST` with a JSON object body.

## Authentication

Requests are signed with HMAC-SHA256 and the project's API key. The processing API uses the same scheme.

```
Merchant:        <your Merchant ID>
X-CC-Timestamp:  <Unix time in seconds>
X-CC-Nonce:      <new random value for every request>
X-CC-Signature:  v1=<hex HMAC-SHA256(api_key, string to sign)>
```

**The API key is never sent.** Mutating operations also require an `Idempotency-Key`. The Merchant ID and the API key are on the project page in Data Suite, [app-data.crypto-chief.com](https://app-data.crypto-chief.com). In the project's **EventStream** section, Data Suite shows subscriptions as *streams* and sinks as *destinations*. See [Authentication](https://crypto-chief.gitbook.io/chief-event-stream/getting-started/authentication.md).

## How a subscription runs

1. [**Create a sink**](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/sinks.md). `sinks/create` registers where events go. For an HTTPS endpoint it returns the secret that signs every webhook. The secret is shown once.
2. [**Create a subscription**](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/subscriptions.md). `subscriptions/create` sets what to catch and which sinks receive it. The subscription starts `pending` and becomes `active` when its first network starts capturing. All networks start together unless `allow_partial_activation` is `true`.
3. **Receive events.** An event is sent at each stage you selected: `found`, `confirmed`, `final`, and `reorged` if a reorganization removes the block. [Confirmations and Reorgs](https://crypto-chief.gitbook.io/chief-event-stream/getting-started/confirmations-and-reorgs.md)
4. **Verify and acknowledge.** For an `https` sink, check the signature on the raw body and answer `2xx`. Delivery is at-least-once: deduplicate by `event_id`. [Receiving Webhooks](https://crypto-chief.gitbook.io/chief-event-stream/guides/receiving-webhooks.md)
5. **Look up past events.** [`events/list`](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/events.md) and [`deliveries/list`](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/deliveries.md) cover the last 30 days. Failed deliveries can be resent.

[How EventStream Works](https://crypto-chief.gitbook.io/chief-event-stream/getting-started/how-eventstream-works.md) describes the objects and their life cycle.

## Networks

| Family     | Mainnets                                                                                            | Testnets                                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| EVM        | `ETH_MAINNET`, `BSC_MAINNET`, `POLYGON_MAINNET`, `ARBITRUM_ONE`, `OPTIMISM_MAINNET`, `AVAX_MAINNET` | `ETH_SEPOLIA`, `BSC_TESTNET`, `POLYGON_AMOY`, `ARBITRUM_SEPOLIA`, `OPTIMISM_SEPOLIA`, `AVAX_TESTNET` |
| TRON       | `TRON_MAINNET`                                                                                      | `TRON_NILE`                                                                                          |
| Solana     | `SOLANA_MAINNET`                                                                                    | —                                                                                                    |
| TON        | `TON_MAINNET`                                                                                       | `TON_TESTNET`                                                                                        |
| XRP Ledger | `XRP_MAINNET`                                                                                       | `XRP_TESTNET`                                                                                        |
| UTXO       | `BTC_MAINNET`, `LITECOIN_MAINNET`, `DOGECOIN_MAINNET`, `BITCOIN_CASH_MAINNET`                       | `BTC_TESTNET_4`                                                                                      |

Which event types each family emits: [Networks and Event Types](https://crypto-chief.gitbook.io/chief-event-stream/getting-started/networks-and-event-types.md).

## The operations

| Group                                                                                                      | Operations                                                                                    |
| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Capabilities](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/capabilities.md)           | `capabilities`                                                                                |
| [Subscriptions](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/subscriptions.md)         | `subscriptions/create`, `update`, `get`, `list`, `pause`, `resume`, `delete`                  |
| [Sinks](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/sinks.md)                         | `sinks/create`, `update`, `get`, `list`, `delete`, `pause`, `resume`, `rotate-secret`, `test` |
| [Watchlists](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/watchlists.md)               | `watchlists/create`, `update`, `get`, `list`, `delete`                                        |
| [Templates](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/templates.md)                 | `templates/list`, `get`, `instantiate`                                                        |
| [Scripts](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/scripts.md)                     | `scripts/validate`, `scripts/test`, `builder/compile`, `rules/explain`                        |
| [Events](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/events.md)                       | `events/list`, `events/get`                                                                   |
| [Deliveries](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/deliveries.md)               | `deliveries/list`, `info`, `resend`, `resend-bulk`, `jobs/list`, `jobs/info`                  |
| [Notifications](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/notifications.md)         | `notifications/list`, `notifications/ack`                                                     |
| [Usage and Pricing](https://crypto-chief.gitbook.io/chief-event-stream/api-reference/usage-and-pricing.md) | `pricing`, `usage/get`                                                                        |

## Billing

Every project gets **10,000 events a month free** (calendar month, UTC). After that each event costs 500 credits ($0.00005), charged to the project's platform API credits. An event is charged once per subscription that delivers it, regardless of the number of stages, sinks and delivery attempts. An event that is never delivered is not charged. Messages to Telegram, Slack, Discord, PagerDuty and email also carry a channel fee, which the free events do not cover. See [Billing](https://crypto-chief.gitbook.io/chief-event-stream/getting-started/billing.md).

## Your first request

`capabilities` returns the networks, event types, stages and limits available to your project. `request()` is defined in [Authentication](https://crypto-chief.gitbook.io/chief-event-stream/getting-started/authentication.md).

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const caps = await request("capabilities", {});
console.log(caps.networks.map((n) => n.network));
```

{% endtab %}

{% tab title="PHP" %}

```php
$caps = request('capabilities', new stdClass());
print_r(array_column($caps['networks'], 'network'));
```

{% endtab %}

{% tab title="GO" %}

```go
caps, err := request("capabilities", map[string]any{}, "")
if err != nil {
	log.Fatal(err)
}
fmt.Println(caps["networks"])
```

{% endtab %}

{% tab title="Python" %}

```python
caps = request("capabilities", {})
print([n["network"] for n in caps["networks"]])
```

{% endtab %}

{% tab title="curl" %}

```bash
request capabilities '{}'
```

{% endtab %}
{% endtabs %}

Next: [Your First Stream](https://crypto-chief.gitbook.io/chief-event-stream/guides/first-stream.md) creates a sink, sends a test delivery and creates a subscription.
