> For the complete documentation index, see [llms.txt](https://docs-eventstream.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-eventstream.crypto-chief.com/getting-started/readme.md).

# General Information

**EventStream** watches blockchains and delivers the events you subscribe to — transfers, contract events, contract calls, failed transactions, new blocks — to your systems: signed HTTPS webhooks, Telegram, Slack, Discord, PagerDuty, email, S3, PostgreSQL, Kafka or ClickHouse.

You describe what to catch in a **subscription**: networks, event types, addresses or contracts, and the confirmation stages you want. Every matching event is delivered to one or more **sinks** and retried until the sink accepts it, for up to `12` attempts within `24` hours. [Sink Types](https://docs-eventstream.crypto-chief.com/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 the project's API key using HMAC-SHA256, the same scheme as the processing API.

```
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.** Operations that change something also take 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 **Event Stream** section, Data Suite shows subscriptions as *streams* and sinks as *destinations*. See [Authentication](https://docs-eventstream.crypto-chief.com/getting-started/authentication.md).

## How a subscription runs

1. [**Create a sink**](https://docs-eventstream.crypto-chief.com/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://docs-eventstream.crypto-chief.com/api-reference/subscriptions.md) — `subscriptions/create` says what to catch and which sinks receive it. It starts `pending` and becomes `active` when its first network starts capturing (all networks start together unless `allow_partial_activation` is `true`).
3. **Receive events.** Each event arrives at each stage you asked for: `found`, `confirmed`, `final`, and `reorged` if the block is dropped. [Confirmations and Reorgs](https://docs-eventstream.crypto-chief.com/getting-started/confirmations-and-reorgs.md)
4. **Verify and acknowledge.** For an `https` sink, check the signature on the raw body and answer `2xx`. Deduplicate by `event_id`: delivery is at-least-once. [Receiving Webhooks](https://docs-eventstream.crypto-chief.com/guides/receiving-webhooks.md)
5. **Look back when needed.** [`events/list`](https://docs-eventstream.crypto-chief.com/api-reference/events.md) and [`deliveries/list`](https://docs-eventstream.crypto-chief.com/api-reference/deliveries.md) show the last 30 days; failed deliveries can be resent.

[How EventStream Works](https://docs-eventstream.crypto-chief.com/getting-started/how-eventstream-works.md) explains 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://docs-eventstream.crypto-chief.com/getting-started/networks-and-event-types.md).

## The operations

| Group                                                                                             | Operations                                                                                    |
| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Capabilities](https://docs-eventstream.crypto-chief.com/api-reference/capabilities.md)           | `capabilities`                                                                                |
| [Subscriptions](https://docs-eventstream.crypto-chief.com/api-reference/subscriptions.md)         | `subscriptions/create`, `update`, `get`, `list`, `pause`, `resume`, `delete`                  |
| [Sinks](https://docs-eventstream.crypto-chief.com/api-reference/sinks.md)                         | `sinks/create`, `update`, `get`, `list`, `delete`, `pause`, `resume`, `rotate-secret`, `test` |
| [Watchlists](https://docs-eventstream.crypto-chief.com/api-reference/watchlists.md)               | `watchlists/create`, `update`, `get`, `list`, `delete`                                        |
| [Templates](https://docs-eventstream.crypto-chief.com/api-reference/templates.md)                 | `templates/list`, `get`, `instantiate`                                                        |
| [Scripts](https://docs-eventstream.crypto-chief.com/api-reference/scripts.md)                     | `scripts/validate`, `scripts/test`, `builder/compile`, `rules/explain`                        |
| [Events](https://docs-eventstream.crypto-chief.com/api-reference/events.md)                       | `events/list`, `events/get`                                                                   |
| [Deliveries](https://docs-eventstream.crypto-chief.com/api-reference/deliveries.md)               | `deliveries/list`, `info`, `resend`, `resend-bulk`, `jobs/list`, `jobs/info`                  |
| [Notifications](https://docs-eventstream.crypto-chief.com/api-reference/notifications.md)         | `notifications/list`, `notifications/ack`                                                     |
| [Usage and Pricing](https://docs-eventstream.crypto-chief.com/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, whatever 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. See [Billing](https://docs-eventstream.crypto-chief.com/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://docs-eventstream.crypto-chief.com/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://docs-eventstream.crypto-chief.com/guides/first-stream.md) — a sink, a test delivery and a subscription, step by step.
