Skip to main content
Beta — This feature is currently in beta. API may be subject to changes.
This document introduces the working principles, configuration methods, and best practices for ChainStream Webhooks, helping you implement real-time on-chain event delivery.
Webhook functionality is available to all users.

How It Works

Data Flow

Core Features


Supported Event Types

Webhook currently supports the following event types (channels):
More event types are in development. Stay tuned!

Create Webhook Endpoint

API Endpoint

Request Parameters

Request Example

Response Example


Webhook Notification Format

Webhook notification data structure is consistent with WebSocket push.

New Token Created (sol.token.created)

Field Descriptions:

Token Graduated (sol.token.migrated)

Additional Fields:

Webhook URL Requirements


Security Verification

Get Webhook Secret

After creating an endpoint, get the secret via this API:
Response:

Signature Verification

Each Webhook request includes signature headers for verifying request origin:

Verification Flow

Code Examples


Manage Webhook Endpoints

List Endpoints

Query Parameters:

Get Endpoint Details

Update Endpoint

Delete Endpoint

Rotate Secret


Best Practices

✅ Fast Response

✅ Idempotency Handling

Each event contains a unique identifier. Record processed events on your server:

✅ Security

Always Verify Signature

Verify signature for every request

Use HTTPS

Ensure transport security

Rotate Secret Regularly

Recommended every 90 days

Protect Sensitive Data

Don’t log sensitive data

✅ Reliability

Implement Idempotency

Handle duplicate requests

Message Queue Buffer

Use queues for async processing

Reasonable Timeout

Avoid long blocking

Comprehensive Logging

Log key information for troubleshooting

FAQ

Troubleshooting steps:
  1. Confirm URL is accessible — Test if URL is reachable from public internet
  2. Check HTTPS — Must use a valid SSL certificate
  3. Check endpoint status — Confirm disabled is not true
  4. Check channels — Confirm subscribed to correct event types
This may be caused by retry mechanism. Implement idempotency handling:
  1. Use unique event identifier (channel + token address + timestamp)
  2. Check if already processed when receiving requests
  3. Use cache with TTL (like Redis) for storage
  1. Use ngrok to expose local service
  2. Create Webhook endpoint pointing to ngrok URL
  3. Wait for real events to trigger, or use test environment
  4. Check local service logs

API Endpoint Summary


WebSocket API

Real-time data subscription

Endpoint API Reference

Complete API documentation