Skip to main content

Create a Stream – Streams REST API

Updated on
Jul 20, 2026

Overview

Creates a new stream with a specified blockchain network, dataset type, destination, and optional filter function. Use this endpoint to programmatically set up real-time or historical blockchain data pipelines.

Key capabilities:

  • Start from a specific block (backfills) or latest block (real-time streaming)
  • Choose destination: webhook, S3, Azure Blob Storage, or PostgreSQL
  • Attach a base64-encoded JavaScript filter to transform data before delivery
  • Configure batch sizes, reorg detection, distance-from-tip, and elastic batching
  • Set up multi-destination delivery with extra_destinations
  • Receive email alerts on stream termination

Endpoint

Send a POST request to the following URL with your stream configuration in the request body.

POST https://api.quicknode.com/streams/rest/v1/streams

Request Parameters

ParameterTypeRequiredDescription
namestringYesA name for your stream
networkstringYesBlockchain network (see Supported Chains)
datasetstringYesDataset type (see Data Sources)
regionstringYesusa_east
dataset_batch_sizeintegerYesNumber of blocks to batch per delivery
elastic_batch_enabledbooleanYesAuto-adjust batch size to 1 near chain tip
destinationstringYeswebhook, s3, azure, or postgres
destination_attributesobjectYesConfiguration for selected destination
statusstringYesactive or paused
filter_functionstringNoBase64-encoded JavaScript filter function
start_rangeintegerNoStarting block number (omit for latest)
end_rangeintegerNoEnding block number (omit for continuous)
fix_block_reorgsintegerNo1 to enable reorg detection and re-streaming
keep_distance_from_tipintegerNoBlocks to stay behind chain tip
notification_emailstringNoEmail for stream termination alerts
extra_destinationsarrayNoAdditional destinations (same structure as primary)

Destination Attributes

Configuration options vary based on the selected destination type. Select a tab below to view the required and optional attributes for each destination.

ParameterTypeRequiredDescription
urlstringYesWebhook endpoint URL
compressionstringYesnone or gzip
max_retryintegerYesMax retry attempts
retry_interval_secintegerYesSeconds between retries
post_timeout_secintegerYesRequest timeout in seconds
headersobjectNoCustom headers as key-value pairs

Example Request

curl -X POST "https://api.quicknode.com/streams/rest/v1/streams" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"name": "My Stream",
"network": "ethereum-mainnet",
"dataset": "block",
"filter_function": "ZnVuY3Rpb24gbWFpbihkYXRhKSB7Li4ufQ==",
"region": "usa_east",
"start_range": 100,
"end_range": 200,
"dataset_batch_size": 1,
"destination": "webhook",
"fix_block_reorgs": 0,
"keep_distance_from_tip": 0,
"elastic_batch_enabled": true,
"destination_attributes": {
"url": "https://webhook.site",
"compression": "none",
"headers": { "Authorization": "Bearer token" },
"max_retry": 3,
"retry_interval_sec": 1,
"post_timeout_sec": 10
},
"status": "active"
}'

Response

On success, the API returns the created stream object with a unique ID, timestamps, and all configured parameters.

{
"id": "f6ad6459-b5ad-4183-b370-1c1388e47e83",
"name": "My Stream",
"network": "ethereum-mainnet",
"dataset": "block",
"region": "usa_east",
"filter_function": "ZnVuY3Rpb24gbWFpbihkYXRhKSB7Li4ufQ==",
"start_range": 100,
"end_range": 200,
"dataset_batch_size": 1,
"elastic_batch_enabled": true,
"fix_block_reorgs": 0,
"keep_distance_from_tip": 0,
"destination": "webhook",
"destination_attributes": {
"url": "https://webhook.site",
"compression": "none",
"headers": { "Authorization": "Bearer token" },
"max_retry": 3,
"retry_interval_sec": 1,
"post_timeout_sec": 10,
"security_token": "qn_xxxxxxxxxxxxxx"
},
"status": "active",
"sequence": 0,
"current_hash": null,
"notification_email": null,
"extra_destinations": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Response Fields

FieldTypeDescription
idstringUnique stream identifier (UUID)
namestringStream name
networkstringBlockchain network
datasetstringDataset type
regionstringDeployment region
filter_functionstringBase64-encoded filter function (if configured)
start_rangeintegerStarting block number
end_rangeintegerEnding block number (null for continuous)
dataset_batch_sizeintegerNumber of blocks per batch
elastic_batch_enabledbooleanWhether elastic batching is enabled
fix_block_reorgsintegerReorg detection setting (1 = enabled)
keep_distance_from_tipintegerBlocks to stay behind chain tip
destinationstringDestination type (webhook, s3, azure, postgres)
destination_attributesobjectDestination configuration (varies by type)
statusstringStream status (active or paused)
sequenceintegerLast delivered block from the data range
current_hashstringHash of the current block being processed
notification_emailstringEmail for stream termination alerts
extra_destinationsarrayAdditional destinations (if configured)
created_atstringStream creation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)

Response Destination Attributes

The destination_attributes object in the response varies based on the destination type. Select a tab below to view the fields returned for each destination.

FieldTypeDescription
urlstringWebhook endpoint URL
compressionstringCompression type (none or gzip)
headersobjectCustom headers (if configured)
max_retryintegerMaximum retry attempts
retry_interval_secintegerSeconds between retries
post_timeout_secintegerRequest timeout in seconds
security_tokenstringAuto-generated token for validating webhook authenticity
note

Sensitive fields like secret_key (S3), sas_token (Azure), and password (PostgreSQL) are not returned in the response for security reasons.

Share this doc