概要
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
クエリパラメータ
| Parameter | 種類 | Required | 説明 |
|---|---|---|---|
| limit | 整数 | いいえ | Maximum number of streams to return. Default: 20 |
| offset | 整数 | いいえ | 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"]}"
終わり
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(())
}
回答
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 | 種類 | 説明 |
|---|---|---|
| データ | 配列 | Array of stream objects |
| pageInfo | オブジェクト | Pagination information |
| pageInfo.total | 整数 | Total number of streams in your account |
| pageInfo.limit | 整数 | Maximum number of streams returned |
| pageInfo.offset | 整数 | Number of streams skipped |
Stream Object Fields
Each stream object in the データ array contains the following fields:
| Field | 種類 | 説明 |
|---|---|---|
| id | 文字列 | Unique stream identifier (UUID) |
| 名前 | 文字列 | Stream name |
| network | 文字列 | Blockchain network |
| dataset | 文字列 | Dataset type |
| region | 文字列 | Deployment region |
| filter_function | 文字列 | Base64-encoded filter function (if configured) |
| start_range | 整数 | Starting block number |
| end_range | 整数 | Ending block number (null for continuous) |
| dataset_batch_size | 整数 | Number of blocks per batch |
| elastic_batch_enabled | ブール値 | Whether elastic batching is enabled |
| fix_block_reorgs | 整数 | Reorg detection setting (1 = enabled) |
| keep_distance_from_tip | 整数 | Blocks to stay behind chain tip |
| destination | 文字列 | Destination type (webhook, s3, azure, postgres) |
| destination_attributes | オブジェクト | Destination configuration (varies by type) |
| ステータス | 文字列 | Stream status (active or paused) |
| シーケンス | 整数 | Last delivered block from the data range |
| current_hash | 文字列 | Hash of the current block being processed |
| notification_email | 文字列 | Email for stream termination alerts |
| extra_destinations | 配列 | Additional destinations (if configured) |
| created_at | 文字列 | Stream creation timestamp (ISO 8601) |
| 更新日時 | 文字列 | 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.