Visão geral
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
Parâmetros de consulta
| Parameter | Tipo | Required | Descrição |
|---|---|---|---|
| limit | número inteiro | Não | Maximum number of streams to return. Default: 20 |
| offset | número inteiro | Não | 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"]}"
fim
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(())
}
Resposta
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 | Tipo | Descrição |
|---|---|---|
| dados | matriz | Array of stream objects |
| pageInfo | objeto | Pagination information |
| pageInfo.total | número inteiro | Total number of streams in your account |
| pageInfo.limit | número inteiro | Maximum number of streams returned |
| pageInfo.offset | número inteiro | Number of streams skipped |
Stream Object Fields
Each stream object in the dados array contains the following fields:
| Field | Tipo | Descrição |
|---|---|---|
| id | cadeia de caracteres | Unique stream identifier (UUID) |
| nome | cadeia de caracteres | Stream name |
| network | cadeia de caracteres | Blockchain network |
| dataset | cadeia de caracteres | Dataset type |
| region | cadeia de caracteres | Deployment region |
| filter_function | cadeia de caracteres | Base64-encoded filter function (if configured) |
| start_range | número inteiro | Starting block number |
| end_range | número inteiro | Ending block number (null for continuous) |
| dataset_batch_size | número inteiro | Number of blocks per batch |
| elastic_batch_enabled | booleano | Whether elastic batching is enabled |
| fix_block_reorgs | número inteiro | Reorg detection setting (1 = enabled) |
| keep_distance_from_tip | número inteiro | Blocks to stay behind chain tip |
| destination | cadeia de caracteres | Destination type (webhook, s3, azure, postgres) |
| destination_attributes | objeto | Destination configuration (varies by type) |
| status | cadeia de caracteres | Stream status (active or paused) |
| sequência | número inteiro | Last delivered block from the data range |
| current_hash | cadeia de caracteres | Hash of the current block being processed |
| notification_email | cadeia de caracteres | Email for stream termination alerts |
| extra_destinations | matriz | Additional destinations (if configured) |
| created_at | cadeia de caracteres | Stream creation timestamp (ISO 8601) |
| atualizado_em | cadeia de caracteres | 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.