개요
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
쿼리 매개변수
| 매개변수 | 유형 | 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
- 자바스크립트
파이썬
- 루비
- 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
}
}
응답 필드
| 분야 | 유형 | 설명 |
|---|---|---|
| 데이터 | 배열 | 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:
| 분야 | 유형 | 설명 |
|---|---|---|
| id | 문자열 | Unique stream identifier (UUID) |
| 이름 | 문자열 | Stream name |
| 네트워크 | 문자열 | 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 |
| 알림 이메일 | 문자열 | 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.