Présentation générale
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
Paramètres de requête
| Paramètre | Type | Obligatoire | Description |
|---|---|---|---|
| limit | entier | Non | Maximum number of streams to return. Default: 20 |
| offset | entier | Non | 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"]}"
fin
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(())
}
Réponse
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
}
}
Champs de réponse
| Champ | Type | Description |
|---|---|---|
| données | tableau | Array of stream objects |
| pageInfo | objet | Pagination information |
| pageInfo.total | entier | Total number of streams in your account |
| pageInfo.limit | entier | Maximum number of streams returned |
| pageInfo.offset | entier | Number of streams skipped |
Stream Object Fields
Each stream object in the données array contains the following fields:
| Champ | Type | Description |
|---|---|---|
| id | chaîne de caractères | Unique stream identifier (UUID) |
| nom | chaîne de caractères | Stream name |
| network | chaîne de caractères | Blockchain network |
| dataset | chaîne de caractères | Dataset type |
| region | chaîne de caractères | Deployment region |
| filter_function | chaîne de caractères | Base64-encoded filter function (if configured) |
| start_range | entier | Starting block number |
| end_range | entier | Ending block number (null for continuous) |
| dataset_batch_size | entier | Number of blocks per batch |
| elastic_batch_enabled | booléen | Whether elastic batching is enabled |
| fix_block_reorgs | entier | Reorg detection setting (1 = enabled) |
| keep_distance_from_tip | entier | Blocks to stay behind chain tip |
| destination | chaîne de caractères | Destination type (webhook, s3, azure, postgres) |
| destination_attributes | objet | Destination configuration (varies by type) |
| statut | chaîne de caractères | Stream status (active or paused) |
| séquence | entier | Last delivered block from the data range |
| current_hash | chaîne de caractères | Hash of the current block being processed |
| notification_email | chaîne de caractères | Email for stream termination alerts |
| extra_destinations | tableau | Additional destinations (if configured) |
| created_at | chaîne de caractères | Stream creation timestamp (ISO 8601) |
| date_de_mise_à_jour | chaîne de caractères | Last update timestamp (ISO 8601) |
remarque
Sensitive fields like secret_key (S3), sas_token (Azure), and password (PostgreSQL) are not returned in the response for security reasons.