Overzicht
Retrieves a paginated list of all streams in your account. Use this endpoint to get an overview of your deployed streams, including their configuration, status, destination details, and current processing position.
Key use cases:
- Build dashboards to monitor all streams
- Audit stream configurations across your account
- Programmatically manage multiple streams
- Check the status and progress of all active streams
Endpoint
Send a GET request to retrieve all streams with optional pagination.
GET https://api.quicknode.com/streams/rest/v1/streams
Zoekparameters
| Parameter | Type | Required | Beschrijving |
|---|---|---|---|
| limiet | geheel getal | Nee | Maximum number of streams to return. Default: 20 |
| offset | geheel getal | Nee | Number of streams to skip before returning results. Default: 0 |
Example Request
- cURL
- CLI
- JavaScript
Python
- Ruby
- SDK (JS)
SDK (Python)
- SDK (Ruby)
- SDK (Rust)
curl -X GET "https://api.quicknode.com/streams/rest/v1/streams?limit=20&offset=0" \
-H "accept: application/json" \
-H "x-api-key: YOUR_API_KEY"
qn stream list --limit 20 -o json
const headers = new Headers()
headers.append('accept', 'application/json')
headers.append('x-api-key', 'YOUR_API_KEY')
fetch('https://api.quicknode.com/streams/rest/v1/streams?limit=20&offset=0', {
method: 'GET',
headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error))
import requests
url = "https://api.quicknode.com/streams/rest/v1/streams"
params = {
"limit": 20,
"offset": 0
}
headers = {
"accept": "application/json",
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
require "uri"
require "net/http"
url = URI("https://api.quicknode.com/streams/rest/v1/streams?limit=20&offset=0")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["x-api-key"] = "YOUR_API_KEY"
response = https.request(request)
puts response.body
import { QuicknodeSdk } from "@quicknode/sdk"
const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })
const response = await qn.streams.listStreams({ limit: 20, offset: 0 })
console.log(`Total streams: ${response.pageInfo.total}`)
for (const stream of response.data) {
console.log(stream.id, stream.name, stream.status)
}
import asyncio
from quicknode_sdk import QuicknodeSdk, SdkFullConfig
async def main():
qn = QuicknodeSdk(SdkFullConfig(api_key="YOUR_API_KEY"))
response = await qn.streams.list_streams(limit=20, offset=0)
print(f"Total streams: {response.page_info.total}")
for stream in response.data:
print(stream.id, stream.name, stream.status)
asyncio.run(main())
require "quicknode_sdk"
qn = QuicknodeSdk::SDK.from_config(api_key: "YOUR_API_KEY")
response = qn.streams.list_streams({ limit: 20, offset: 0 })
puts "Total streams: #{response["pageInfo"]["total"]}"
response["data"].each do |stream|
puts "#{stream["id"]} #{stream["name"]} #{stream["status"]}"
einde
use quicknode_sdk::{streams::ListStreamsParams, QuicknodeSdk, SdkFullConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("YOUR_API_KEY").build())?;
let params = ListStreamsParams {
limit: Some(20),
offset: Some(0),
..Default::default()
};
let response = qn.streams.list_streams(¶ms).await?;
println!("Total streams: {}", response.page_info.total);
for stream in response.data {
println!("{} {} {}", stream.id, stream.name, stream.status);
}
Ok(())
}
Antwoord
On success, the API returns a paginated list of stream objects.
{
"data": [
{
"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",
"max_retry": 3,
"retry_interval_sec": 1,
"post_timeout_sec": 10,
"mtls": true,
"security_token": "qn_xxxxxxxxxxxxxx"
},
"status": "active",
"sequence": 150,
"current_hash": "0x1234567890abcdef...",
"notification_email": null,
"extra_destinations": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:45:00Z"
}
],
"pageInfo": {
"total": 1,
"limit": 20,
"offset": 0
}
}
Response Fields
| Field | Type | Beschrijving |
|---|---|---|
| gegevens | array | Array of stream objects |
| pageInfo | object | Pagination information |
| pageInfo.total | geheel getal | Total number of streams in your account |
| pageInfo.limit | geheel getal | Maximum number of streams returned |
| pageInfo.offset | geheel getal | Number of streams skipped |
Stream Object Fields
Each stream object in the gegevens array contains the following fields:
| Field | Type | Beschrijving |
|---|---|---|
| id | tekenreeks | Unique stream identifier (UUID) |
| naam | tekenreeks | Stream name |
| network | tekenreeks | Blockchain network |
| dataset | tekenreeks | Dataset type |
| region | tekenreeks | Deployment region |
| filter_function | tekenreeks | Base64-encoded filter function (if configured) |
| start_range | geheel getal | Starting block number |
| end_range | geheel getal | Ending block number (null for continuous) |
| dataset_batch_size | geheel getal | Number of blocks per batch |
| elastic_batch_enabled | booleaanse waarde | Whether elastic batching is enabled |
| fix_block_reorgs | geheel getal | Reorg detection setting (1 = enabled) |
| keep_distance_from_tip | geheel getal | Blocks to stay behind chain tip |
| destination | tekenreeks | Destination type (webhook, s3, azure, postgres) |
| destination_attributes | object | Destination configuration (varies by type) |
| status | tekenreeks | Stream status (active or paused) |
| reeks | geheel getal | Last delivered block from the data range |
| current_hash | tekenreeks | Hash of the current block being processed |
| notification_email | tekenreeks | Email for stream termination alerts |
| extra_destinations | array | Additional destinations (if configured) |
| created_at | tekenreeks | Stream creation timestamp (ISO 8601) |
| bijgewerkt_op | tekenreeks | Last update timestamp (ISO 8601) |
note
Sensitive fields like secret_key (S3), sas_token (Azure), and password (PostgreSQL) are not returned in the response for security reasons.