Quicknode SDK
A unified SDK for building on QuickNode.
Rust SDK with Python, Node.js, and Ruby bindings.
Table of Contents
- Project Structure
- Installation
- Quick Start
- Configuration
- API Reference
- Error Handling
- Development
- License
Project Structure
sdk/
├── crates/
│ ├── core/ # Pure Rust business logic
│ ├── python/ # PyO3 bindings
│ ├── node/ # napi-rs bindings
│ └── ruby/ # magnus bindings
├── python/sdk/ # Python package with type hints
├── npm/ # Node.js package with TypeScript types
├── ruby/ # Ruby package
└── pyproject.toml # maturin build config
Installation
Python: uv add quicknode-sdk
Node.js: npm install quicknode-sdk
Ruby: gem install quicknode-sdk (not yet published — see Development below)
Quick Start
Construct the SDK once, then reach into the four sub-clients (admin, streams, webhooks, kvstore). Subsequent API Reference snippets assume you have a qn handle from one of these blocks.
// Rust
use ;
async
# Python
=
= await
// Node.js
import { QuickNodeSdk } from "quicknode-sdk";
const qn = QuickNodeSdk.fromEnv();
const resp = await qn.admin.getEndpoints();
console.log(`${resp.data.length} endpoints`);
# Ruby
qn = QuickNodeSdk::SDK.from_env
resp = JSON.parse(qn.admin.get_endpoints({}))
puts
Configuration
There are two ways to configure the SDK.
Option A — Pass config directly
# Python
=
// Node.js
import { QuickNodeSdk } from "quicknode-sdk";
const qn = new QuickNodeSdk({ apiKey: "your-key", http: { timeoutSecs: 30 } });
// Rust
let qn = new?;
Option B — Load from environment (from_env())
# Python
=
// Node.js
const qn = QuickNodeSdk.fromEnv();
# Ruby
qn = QuickNodeSdk::SDK.from_env
// Rust
let qn = from_env?;
Environment variables (prefix QN_SDK__, separator __):
| Variable | Required | Default | Description |
|---|---|---|---|
QN_SDK__API_KEY |
yes | — | Your QuickNode API key |
QN_SDK__HTTP__TIMEOUT_SECS |
no | 30 | HTTP request timeout in seconds |
QN_SDK__HTTP__POOL_MAX_IDLE_PER_HOST |
no | — | Max idle HTTP connections per host |
QN_SDK__ADMIN__BASE_URL |
no | https://api.quicknode.com/v0/ |
Override admin API base URL (HTTPS, must end with /) |
QN_SDK__STREAMS__BASE_URL |
no | https://api.quicknode.com/streams/rest/v1/ |
Override streams base URL |
QN_SDK__WEBHOOKS__BASE_URL |
no | https://api.quicknode.com/webhooks/rest/v1/ |
Override webhooks base URL |
QN_SDK__KVSTORE__BASE_URL |
no | https://api.quicknode.com/kv/rest/v1/ |
Override KV store base URL |
API Reference
Each method below shows the call pattern in Rust, Python, Node.js, and Ruby in that order. Snippets assume qn was already constructed via the Quick Start. Optional parameters are skipped unless showing one is needed to illustrate usage.
Language conventions
- Rust: methods are
asyncand returnResult<T, SdkError>. Request structs use thebonbuilder pattern via::builder(). - Python: methods are
async— call withawait. Parameters are kwargs; responses are nativepyclassobjects with attribute access. - Node.js: methods are
asyncand take a single options object with camelCase keys. - Ruby: methods are blocking (not async). Parameters are a single Hash with symbol keys. Responses that carry data are returned as JSON strings — wrap calls with
JSON.parse. Unknown keys raiseArgumentError.
Admin Client
Accessed as qn.admin. Manages endpoints, tags, teams, billing, usage, metrics, security, and rate limits. Backed by https://api.quicknode.com/v0/.
Endpoints
get_endpoints / getEndpoints
Returns a paginated list of endpoints on the account with optional search, filters (networks, statuses, labels, tags, dedicated, flat-rate), sorting, and pagination.
Parameters (all optional): limit (i32), offset (i32), search (string), sort_by (string), sort_direction ("asc" | "desc"), networks (string[]), statuses (string[]), labels (string[]), dedicated (bool), is_flat_rate (bool), tag_ids (i32[]), tag_labels (string[]).
Returns: GetEndpointsResponse — { data: Endpoint[], pagination?: Pagination }.
// Rust
let params = builder
.limit
.sort_by
.sort_direction
.build;
let resp = qn.admin.get_endpoints.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getEndpoints({
limit: 20,
sortBy: "created_at",
sortDirection: "desc",
});
# Ruby
resp = JSON.parse(qn.admin.get_endpoints(limit: 20, sort_by: , sort_direction: ))
create_endpoint / createEndpoint
Creates a new endpoint for the given blockchain and network.
Parameters: chain (string, optional), network (string, optional).
Returns: CreateEndpointResponse with data: SingleEndpoint.
// Rust
let params = builder
.chain
.network
.build;
let resp = qn.admin.create_endpoint.await?;
# Python
= await
// Node.js
const resp = await qn.admin.createEndpoint({ chain: "ethereum", network: "mainnet" });
# Ruby
resp = JSON.parse(qn.admin.create_endpoint(chain: , network: ))
show_endpoint / showEndpoint
Fetches a single endpoint by id, including its full security configuration and rate limits.
Parameters: id (string, required).
Returns: ShowEndpointResponse with data: SingleEndpoint.
// Rust
let resp = qn.admin.show_endpoint.await?;
# Python
= await
// Node.js
const resp = await qn.admin.showEndpoint("ep-123");
# Ruby
resp = JSON.parse(qn.admin.show_endpoint(id: ))
update_endpoint / updateEndpoint
Updates editable fields on an endpoint. Currently supports label.
Parameters: id (string, required); body: label (string, optional).
Returns: nothing.
// Rust
let params = builder.label.build;
qn.admin.update_endpoint.await?;
# Python
await
// Node.js
await qn.admin.updateEndpoint("ep-123", { label: "my label" });
# Ruby
qn.admin.update_endpoint(id: , label: )
archive_endpoint / archiveEndpoint
Archives an endpoint. The HTTP verb is DELETE but the effect is archival, not permanent deletion.
Parameters: id (string, required).
Returns: nothing.
// Rust
qn.admin.archive_endpoint.await?;
# Python
await
// Node.js
await qn.admin.archiveEndpoint("ep-123");
# Ruby
qn.admin.archive_endpoint(id: )
update_endpoint_status / updateEndpointStatus
Pauses or unpauses an endpoint.
Parameters: id (string, required); body: status (string, required — "active" or "paused").
Returns: UpdateEndpointStatusResponse.
// Rust
let params = builder.status.build;
qn.admin.update_endpoint_status.await?;
# Python
await
// Node.js
await qn.admin.updateEndpointStatus("ep-123", { status: "paused" });
# Ruby
JSON.parse(qn.admin.update_endpoint_status(id: , status: ))
Endpoint Tags
Per-endpoint tag add/remove. For account-wide tag management see Account Tags.
create_tag / createTag
Tags an endpoint with the given label. Creates the tag on the account if it does not exist.
Parameters: id (string, required); body: label (string, optional).
Returns: nothing.
// Rust
let params = builder.label.build;
qn.admin.create_tag.await?;
# Python
await
// Node.js
await qn.admin.createTag("ep-123", { label: "prod" });
# Ruby
qn.admin.create_tag(id: , label: )
delete_tag / deleteTag
Removes a tag from a specific endpoint.
Parameters: id (endpoint id, string, required), tag_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_tag.await?;
# Python
await
// Node.js
await qn.admin.deleteTag("ep-123", "42");
# Ruby
qn.admin.delete_tag(id: , tag_id: )
Teams
list_teams / listTeams
Lists all teams on the account.
Parameters: none.
Returns: ListTeamsResponse with data: TeamSummary[].
// Rust
let resp = qn.admin.list_teams.await?;
# Python
= await
// Node.js
const resp = await qn.admin.listTeams();
# Ruby
resp = JSON.parse(qn.admin.list_teams)
create_team / createTeam
Creates a new team.
Parameters: name (string, required).
Returns: CreateTeamResponse with data: CreateTeamData.
// Rust
let params = builder.name.build;
let resp = qn.admin.create_team.await?;
# Python
= await
// Node.js
const resp = await qn.admin.createTeam({ name: "Payments" });
# Ruby
resp = JSON.parse(qn.admin.create_team(name: ))
get_team / getTeam
Fetches team detail including pending invites.
Parameters: id (i64, required).
Returns: GetTeamResponse with data: TeamDetail.
// Rust
let resp = qn.admin.get_team.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getTeam(42);
# Ruby
resp = JSON.parse(qn.admin.get_team(id: 42))
delete_team / deleteTeam
Deletes a team.
Parameters: id (i64, required).
Returns: DeleteTeamResponse.
// Rust
qn.admin.delete_team.await?;
# Python
await
// Node.js
await qn.admin.deleteTeam(42);
# Ruby
qn.admin.delete_team(id: 42)
list_team_endpoints / listTeamEndpoints
Lists endpoints accessible to a team.
Parameters: id (i64, required).
Returns: ListTeamEndpointsResponse with data: TeamEndpoint[].
// Rust
let resp = qn.admin.list_team_endpoints.await?;
# Python
= await
// Node.js
const resp = await qn.admin.listTeamEndpoints(42);
# Ruby
resp = JSON.parse(qn.admin.list_team_endpoints(id: 42))
update_team_endpoints / updateTeamEndpoints
Replaces the set of endpoints associated with a team. Pass an empty array to remove all.
Parameters: id (i64, required); body: endpoint_ids (string[], required).
Returns: UpdateTeamEndpointsResponse.
// Rust
let params = builder
.endpoint_ids
.build;
qn.admin.update_team_endpoints.await?;
# Python
await
// Node.js
await qn.admin.updateTeamEndpoints(42, { endpointIds: ["ep-123", "ep-456"] });
# Ruby
qn.admin.update_team_endpoints(id: 42, endpoint_ids: [, ])
invite_team_member / inviteTeamMember
Invites a user to a team. Existing users only need email; new users require full_name and role.
Parameters: id (i64, required); body: email (string, required), full_name (string, optional), role (string, optional — admin | viewer | billing).
Returns: InviteTeamMemberResponse.
// Rust
let params = builder
.email
.role
.build;
qn.admin.invite_team_member.await?;
# Python
await
// Node.js
await qn.admin.inviteTeamMember(42, { email: "alice@example.com", role: "viewer" });
# Ruby
qn.admin.invite_team_member(id: 42, email: , role: )
remove_team_member / removeTeamMember
Removes a user from a team.
Parameters: id (team id, i64, required), user_id (i64, required).
Returns: RemoveTeamMemberResponse.
// Rust
qn.admin.remove_team_member.await?;
# Python
await
// Node.js
await qn.admin.removeTeamMember(42, 7);
# Ruby
qn.admin.remove_team_member(id: 42, user_id: 7)
resend_team_invite / resendTeamInvite
Re-sends a pending team invitation.
Parameters: id (team id, i64, required), user_id (i64, required).
Returns: ResendTeamInviteResponse.
// Rust
qn.admin.resend_team_invite.await?;
# Python
await
// Node.js
await qn.admin.resendTeamInvite(42, 7);
# Ruby
qn.admin.resend_team_invite(id: 42, user_id: 7)
Usage
All usage methods accept optional start_time and end_time Unix timestamps. Omit both for account-to-date totals.
get_usage / getUsage
Aggregate account usage for a time window.
Returns: GetUsageResponse with data: UsageData (credits_used, credits_remaining, limit, overages, start_time, end_time).
// Rust
let resp = qn.admin.get_usage.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getUsage();
# Ruby
resp = JSON.parse(qn.admin.get_usage({}))
get_usage_by_endpoint / getUsageByEndpoint
Per-endpoint usage breakdown.
Returns: GetUsageByEndpointResponse with data.endpoints: EndpointUsage[].
// Rust
let resp = qn.admin.get_usage_by_endpoint.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getUsageByEndpoint();
# Ruby
resp = JSON.parse(qn.admin.get_usage_by_endpoint({}))
get_usage_by_method / getUsageByMethod
Per-RPC-method usage breakdown.
Returns: GetUsageByMethodResponse with data.methods: MethodUsage[].
// Rust
let resp = qn.admin.get_usage_by_method.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getUsageByMethod();
# Ruby
resp = JSON.parse(qn.admin.get_usage_by_method({}))
get_usage_by_chain / getUsageByChain
Per-chain usage breakdown.
Returns: GetUsageByChainResponse with data.chains: ChainUsage[].
// Rust
let resp = qn.admin.get_usage_by_chain.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getUsageByChain();
# Ruby
resp = JSON.parse(qn.admin.get_usage_by_chain({}))
get_usage_by_tag / getUsageByTag
Per-tag usage breakdown.
Returns: GetUsageByTagResponse with data.tags: TagUsage[].
// Rust
let resp = qn.admin.get_usage_by_tag.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getUsageByTag();
# Ruby
resp = JSON.parse(qn.admin.get_usage_by_tag({}))
Logs
get_endpoint_logs / getEndpointLogs
Fetches a page of request logs for an endpoint. Set include_details=true for full request/response payloads (truncated at 2 KB each).
Parameters: id (endpoint id, required); body: from (string timestamp, required), to (string timestamp, required), include_details (bool, optional), limit (i32, optional), next_at (string cursor, optional).
Returns: GetEndpointLogsResponse — { data: EndpointLog[], next_at?: string }.
// Rust
let params = builder
.from
.to
.limit
.build;
let resp = qn.admin.get_endpoint_logs.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getEndpointLogs("ep-123", {
from: "2026-04-01T00:00:00Z",
to: "2026-04-02T00:00:00Z",
limit: 100,
});
# Ruby
resp = JSON.parse(qn.admin.get_endpoint_logs(
id: ,
from_time: ,
to_time: ,
limit: 100
))
get_log_details / getLogDetails
Returns the full request/response payloads for a single log entry.
Parameters: id (endpoint id, required), request_id (log request uuid, required).
Returns: GetLogDetailsResponse with data: LogDetails.
// Rust
let resp = qn.admin.get_log_details.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getLogDetails("ep-123", "req-abc");
# Ruby
resp = JSON.parse(qn.admin.get_log_details(id: , request_id: ))
Endpoint Security
get_endpoint_security / getEndpointSecurity
Returns the full security configuration for an endpoint: tokens, JWTs, referrers, domain masks, IPs, request filters, and their per-feature toggles.
Parameters: id (string, required).
Returns: GetEndpointSecurityResponse with data: EndpointSecurity.
// Rust
let resp = qn.admin.get_endpoint_security.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getEndpointSecurity("ep-123");
# Ruby
resp = JSON.parse(qn.admin.get_endpoint_security(id: ))
Security Options
get_security_options / getSecurityOptions
Returns the list of security features and their enabled state for an endpoint.
Parameters: id (string, required).
Returns: GetSecurityOptionsResponse with data: SecurityOption[].
// Rust
let resp = qn.admin.get_security_options.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getSecurityOptions("ep-123");
# Ruby
resp = JSON.parse(qn.admin.get_security_options(id: ))
update_security_options / updateSecurityOptions
Enables or disables individual security features. Each field accepts "enabled" or "disabled".
Parameters: id (string, required); options: SecurityOptionsUpdate (tokens, referrers, jwts, ips, domain_masks, hsts, cors, request_filters, ip_custom_header).
Returns: UpdateSecurityOptionsResponse with updated SecurityOption[].
// Rust
let options = builder
.tokens
.jwts
.build;
let params = UpdateSecurityOptionsRequest ;
qn.admin.update_security_options.await?;
# Python
await
// Node.js
await qn.admin.updateSecurityOptions("ep-123", {
options: { tokens: "enabled", jwts: "disabled" },
});
# Ruby
qn.admin.update_security_options(id: , tokens: , jwts: )
Tokens
create_token / createToken
Generates a new auth token on an endpoint.
Parameters: id (endpoint id, required).
Returns: nothing.
// Rust
qn.admin.create_token.await?;
# Python
await
// Node.js
await qn.admin.createToken("ep-123");
# Ruby
qn.admin.create_token(id: )
delete_token / deleteToken
Revokes a token on an endpoint.
Parameters: id (endpoint id, required), token_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_token.await?;
# Python
await
// Node.js
await qn.admin.deleteToken("ep-123", "tok-1");
# Ruby
qn.admin.delete_token(id: , token_id: )
Referrers
create_referrer / createReferrer
Whitelists a referrer URL or domain on an endpoint.
Parameters: id (endpoint id, required); body: referrer (string, optional).
Returns: nothing.
// Rust
let params = builder.referrer.build;
qn.admin.create_referrer.await?;
# Python
await
// Node.js
await qn.admin.createReferrer("ep-123", { referrer: "example.com" });
# Ruby
qn.admin.create_referrer(id: , referrer: )
delete_referrer / deleteReferrer
Removes a referrer from the whitelist.
Parameters: id (endpoint id, required), referrer_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_referrer.await?;
# Python
await
// Node.js
await qn.admin.deleteReferrer("ep-123", "ref-1");
# Ruby
qn.admin.delete_referrer(id: , referrer_id: )
IPs
create_ip / createIp
Whitelists an IP address on an endpoint.
Parameters: id (endpoint id, required); body: ip (string, optional).
Returns: nothing.
// Rust
let params = builder.ip.build;
qn.admin.create_ip.await?;
# Python
await
// Node.js
await qn.admin.createIp("ep-123", { ip: "198.51.100.7" });
# Ruby
qn.admin.create_ip(id: , ip: )
delete_ip / deleteIp
Removes an IP from the whitelist.
Parameters: id (endpoint id, required), ip_id (string, required).
Returns: DeleteBoolResponse.
// Rust
qn.admin.delete_ip.await?;
# Python
await
// Node.js
await qn.admin.deleteIp("ep-123", "ip-1");
# Ruby
resp = JSON.parse(qn.admin.delete_ip(id: , ip_id: ))
Domain Masks
create_domain_mask / createDomainMask
Adds a custom domain mask to an endpoint.
Parameters: id (endpoint id, required); body: domain_mask (string, optional).
Returns: nothing.
// Rust
let params = builder
.domain_mask
.build;
qn.admin.create_domain_mask.await?;
# Python
await
// Node.js
await qn.admin.createDomainMask("ep-123", { domainMask: "rpc.example.com" });
# Ruby
qn.admin.create_domain_mask(id: , domain_mask: )
delete_domain_mask / deleteDomainMask
Removes a domain mask.
Parameters: id (endpoint id, required), domain_mask_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_domain_mask.await?;
# Python
await
// Node.js
await qn.admin.deleteDomainMask("ep-123", "dm-1");
# Ruby
qn.admin.delete_domain_mask(id: , domain_mask_id: )
JWTs
create_jwt / createJwt
Configures JWT validation on an endpoint.
Parameters: id (endpoint id, required); body: public_key (string, optional), kid (string, optional), name (string, optional).
Returns: nothing.
// Rust
let params = builder
.public_key
.kid
.name
.build;
qn.admin.create_jwt.await?;
# Python
await
// Node.js
await qn.admin.createJwt("ep-123", {
publicKey: "-----BEGIN PUBLIC KEY-----\n...",
kid: "key-1",
name: "primary",
});
# Ruby
qn.admin.create_jwt(
id: ,
public_key: ,
kid: ,
name:
)
delete_jwt / deleteJwt
Removes a JWT configuration.
Parameters: id (endpoint id, required), jwt_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_jwt.await?;
# Python
await
// Node.js
await qn.admin.deleteJwt("ep-123", "jwt-1");
# Ruby
qn.admin.delete_jwt(id: , jwt_id: )
Request Filters
Whitelist specific RPC methods on an endpoint. Requests for methods not on the list are blocked when the feature is enabled.
create_request_filter / createRequestFilter
Parameters: id (endpoint id, required); body: method (string[], optional). Ruby's Hash key is methods (plural).
Returns: CreateRequestFilterResponse with data.id.
// Rust
let params = builder
.method
.build;
let resp = qn.admin.create_request_filter.await?;
# Python
= await
// Node.js
const resp = await qn.admin.createRequestFilter("ep-123", {
method: ["eth_blockNumber", "eth_getBalance"],
});
# Ruby
resp = JSON.parse(qn.admin.create_request_filter(
id: ,
methods: [, ]
))
update_request_filter / updateRequestFilter
Parameters: id (endpoint id, required), request_filter_id (string, required); body: method (string[], optional). Ruby's Hash keys are request_filter_id and methods (plural).
Returns: nothing.
// Rust
let params = builder
.method
.build;
qn.admin.update_request_filter.await?;
# Python
await
// Node.js
await qn.admin.updateRequestFilter("ep-123", "f-1", { method: ["eth_call"] });
# Ruby
qn.admin.update_request_filter(id: , request_filter_id: , methods: [])
delete_request_filter / deleteRequestFilter
Parameters: id (endpoint id, required), request_filter_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_request_filter.await?;
# Python
await
// Node.js
await qn.admin.deleteRequestFilter("ep-123", "f-1");
# Ruby
qn.admin.delete_request_filter(id: , request_filter_id: )
Multichain
enable_multichain / enableMultichain
Enables multichain on an endpoint.
Parameters: id (endpoint id, required).
Returns: nothing.
// Rust
qn.admin.enable_multichain.await?;
# Python
await
// Node.js
await qn.admin.enableMultichain("ep-123");
# Ruby
qn.admin.enable_multichain(id: )
disable_multichain / disableMultichain
Disables multichain on an endpoint.
Parameters: id (endpoint id, required).
Returns: nothing.
// Rust
qn.admin.disable_multichain.await?;
# Python
await
// Node.js
await qn.admin.disableMultichain("ep-123");
# Ruby
qn.admin.disable_multichain(id: )
IP Custom Headers
create_or_update_ip_custom_header / createOrUpdateIpCustomHeader
Sets the custom header used to identify the client IP (e.g. when traffic is proxied).
Parameters: id (endpoint id, required); body: header_name (string, required).
Returns: CreateOrUpdateIpCustomHeaderResponse with data.header_name.
// Rust
let params = builder
.header_name
.build;
qn.admin.create_or_update_ip_custom_header.await?;
# Python
await
// Node.js
await qn.admin.createOrUpdateIpCustomHeader("ep-123", { headerName: "X-Forwarded-For" });
# Ruby
JSON.parse(qn.admin.create_or_update_ip_custom_header(
id: ,
header_name:
))
delete_ip_custom_header / deleteIpCustomHeader
Removes the custom IP header configuration.
Parameters: id (endpoint id, required).
Returns: DeleteBoolResponse.
// Rust
qn.admin.delete_ip_custom_header.await?;
# Python
await
// Node.js
await qn.admin.deleteIpCustomHeader("ep-123");
# Ruby
JSON.parse(qn.admin.delete_ip_custom_header(id: ))
Method Rate Limits
get_method_rate_limits / getMethodRateLimits
Lists method-level rate limiters configured on an endpoint.
Parameters: id (endpoint id, required).
Returns: GetMethodRateLimitsResponse with data.rate_limiters: MethodRateLimiter[].
// Rust
let resp = qn.admin.get_method_rate_limits.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getMethodRateLimits("ep-123");
# Ruby
resp = JSON.parse(qn.admin.get_method_rate_limits(id: ))
create_method_rate_limit / createMethodRateLimit
Creates a new method-level rate limiter.
Parameters: id (endpoint id, required); body: interval (string, e.g. "second"), methods (string[]), rate (i32).
Returns: CreateMethodRateLimitResponse with data: MethodRateLimiter.
// Rust
let params = builder
.interval
.methods
.rate
.build;
let resp = qn.admin.create_method_rate_limit.await?;
# Python
= await
// Node.js
const resp = await qn.admin.createMethodRateLimit("ep-123", {
interval: "second",
methods: ["eth_call"],
rate: 10,
});
# Ruby
resp = JSON.parse(qn.admin.create_method_rate_limit(
id: ,
interval: ,
methods: [],
rate: 10
))
update_method_rate_limit / updateMethodRateLimit
Updates an existing rate limiter. Only provided fields change.
Parameters: id (endpoint id, required), method_rate_limit_id (string, required); body: methods (string[], optional), status ("enabled" | "disabled", optional), rate (i32, optional).
Returns: UpdateMethodRateLimitResponse.
// Rust
let params = builder.rate.build;
qn.admin.update_method_rate_limit.await?;
# Python
await
// Node.js
await qn.admin.updateMethodRateLimit("ep-123", "rl-1", { rate: 50 });
# Ruby
JSON.parse(qn.admin.update_method_rate_limit(id: , method_rate_limit_id: , rate: 50))
delete_method_rate_limit / deleteMethodRateLimit
Deletes a rate limiter.
Parameters: id (endpoint id, required), method_rate_limit_id (string, required).
Returns: nothing.
// Rust
qn.admin.delete_method_rate_limit.await?;
# Python
await
// Node.js
await qn.admin.deleteMethodRateLimit("ep-123", "rl-1");
# Ruby
qn.admin.delete_method_rate_limit(id: , method_rate_limit_id: )
Endpoint Rate Limits
update_rate_limits / updateRateLimits
Updates the endpoint-level RPS / RPM / RPD caps.
Parameters: id (endpoint id, required); rate_limits: RateLimitSettings (rps, rpm, rpd, all optional).
Returns: nothing.
// Rust
let rate_limits = builder.rps.rpm.build;
let params = UpdateRateLimitsRequest ;
qn.admin.update_rate_limits.await?;
# Python
await
// Node.js
await qn.admin.updateRateLimits("ep-123", { rateLimits: { rps: 100, rpm: 5000 } });
# Ruby
qn.admin.update_rate_limits(id: , rps: 100, rpm: 5000)
Metrics
get_endpoint_metrics / getEndpointMetrics
Returns metric series for an endpoint over a time period.
Parameters: id (endpoint id, required); body: period ("hour" | "day" | "week" | "month"), metric (e.g. "method_calls_over_time", "response_status_breakdown").
Returns: GetEndpointMetricsResponse with data: EndpointMetric[].
// Rust
let params = GetEndpointMetricsRequest ;
let resp = qn.admin.get_endpoint_metrics.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getEndpointMetrics("ep-123", {
period: "day",
metric: "method_calls_over_time",
});
# Ruby
resp = JSON.parse(qn.admin.get_endpoint_metrics(
id: ,
period: ,
metric:
))
get_account_metrics / getAccountMetrics
Returns account-level metric series. Supports an optional percentile (e.g. "p50", "p95", "p99") for latency metrics.
Parameters: period (required), metric (required), percentile (string, optional).
Returns: GetAccountMetricsResponse with data: EndpointMetric[].
// Rust
let params = GetAccountMetricsRequest ;
let resp = qn.admin.get_account_metrics.await?;
# Python
= await
// Node.js
const resp = await qn.admin.getAccountMetrics({
period: "day",
metric: "credits_over_time",
});
# Ruby
resp = JSON.parse(qn.admin.get_account_metrics(period: , metric: ))
Chains
list_chains / listChains
Lists the blockchains supported by QuickNode along with their networks.
Parameters: none.
Returns: ListChainsResponse with data: Chain[].
// Rust
let resp = qn.admin.list_chains.await?;
# Python
= await
// Node.js
const resp = await qn.admin.listChains();
# Ruby
resp = JSON.parse(qn.admin.list_chains)
Billing
list_invoices / listInvoices
Lists invoices on the account.
Parameters: none.
Returns: ListInvoicesResponse with data.invoices: Invoice[].
// Rust
let resp = qn.admin.list_invoices.await?;
# Python
= await
// Node.js
const resp = await qn.admin.listInvoices();
# Ruby
resp = JSON.parse(qn.admin.list_invoices)
list_payments / listPayments
Lists payments on the account.
Parameters: none.
Returns: ListPaymentsResponse with data.payments: Payment[].
// Rust
let resp = qn.admin.list_payments.await?;
# Python
= await
// Node.js
const resp = await qn.admin.listPayments();
# Ruby
resp = JSON.parse(qn.admin.list_payments)
Bulk Operations
bulk_update_endpoint_status / bulkUpdateEndpointStatus
Activates or pauses many endpoints at once.
Parameters: ids (string[], required), status ("active" | "paused", required).
Returns: BulkUpdateEndpointStatusResponse with per-endpoint results.
// Rust
let params = builder
.ids
.status
.build;
let resp = qn.admin.bulk_update_endpoint_status.await?;
# Python
= await
// Node.js
const resp = await qn.admin.bulkUpdateEndpointStatus({
ids: ["ep-1", "ep-2"],
status: "paused",
});
# Ruby
resp = JSON.parse(qn.admin.bulk_update_endpoint_status(ids: [, ], status: ))
bulk_add_tag / bulkAddTag
Applies a tag (created if missing) to many endpoints at once.
Parameters: ids (string[], required), label (string, required).
Returns: BulkAddTagResponse.
// Rust
let params = builder
.ids
.label
.build;
let resp = qn.admin.bulk_add_tag.await?;
# Python
= await
// Node.js
const resp = await qn.admin.bulkAddTag({ ids: ["ep-1", "ep-2"], label: "prod" });
# Ruby
resp = JSON.parse(qn.admin.bulk_add_tag(ids: [, ], label: ))
bulk_remove_tag / bulkRemoveTag
Removes a tag from many endpoints at once.
Parameters: ids (string[], required), tag_id (i32, required).
Returns: BulkRemoveTagResponse.
// Rust
let params = builder
.ids
.tag_id
.build;
let resp = qn.admin.bulk_remove_tag.await?;
# Python
= await
// Node.js
const resp = await qn.admin.bulkRemoveTag({ ids: ["ep-1", "ep-2"], tagId: 42 });
# Ruby
resp = JSON.parse(qn.admin.bulk_remove_tag(ids: [, ], tag_id: 42))
Account Tags
list_tags / listTags
Lists every tag on the account along with usage counts.
Parameters: none.
Returns: ListTagsResponse with data.tags: AccountTag[].
// Rust
let resp = qn.admin.list_tags.await?;
# Python
= await
// Node.js
const resp = await qn.admin.listTags();
# Ruby
resp = JSON.parse(qn.admin.list_tags)
rename_tag / renameTag
Renames an account-level tag.
Parameters: tag_id (i32, required); body: label (string, required).
Returns: RenameTagResponse with updated AccountTag.
// Rust
let params = builder.label.build;
let resp = qn.admin.rename_tag.await?;
# Python
= await
// Node.js
const resp = await qn.admin.renameTag(42, { label: "staging" });
# Ruby
resp = JSON.parse(qn.admin.rename_tag(tag_id: 42, label: ))
delete_account_tag / deleteAccountTag
Deletes a tag from the account. The tag must first be removed from any endpoints using it.
Parameters: id (i32, required).
Returns: DeleteAccountTagResponse.
// Rust
qn.admin.delete_account_tag.await?;
# Python
await
// Node.js
await qn.admin.deleteAccountTag(42);
# Ruby
JSON.parse(qn.admin.delete_account_tag(id: 42))
Streams Client
Accessed as qn.streams. Creates and manages blockchain data streams that deliver filtered on-chain events to configured destinations. Backed by https://api.quicknode.com/streams/rest/v1/.
Datasets, Regions, and Destinations
Enums used across stream methods:
StreamRegion:UsaEast,EuropeCentral,AsiaEast(wire values:usa_east,europe_central,asia_east).StreamDataset:Block,BlockWithReceipts,Transactions,Logs,Receipts,TraceBlocks,DebugTraces,BlockWithReceiptsDebugTrace,BlockWithReceiptsTraceBlock,BlobSidecars,ProgramsWithLogs,Ledger,Events,Orders,Trades,BookUpdates,Twap,WriterActions.StreamStatus:Active,Paused,Terminated,Completed,Blocked.FilterLanguage:Javascript,Go,Wasm.StreamMetadataLocation:Body,Header,None.
Destinations are expressed via DestinationAttributes. Each variant wraps an attribute struct:
| Variant | Struct | Key fields |
|---|---|---|
Webhook |
WebhookAttributes |
url, max_retry, retry_interval_sec, post_timeout_sec, compression, security_token? |
S3 |
S3Attributes |
endpoint, access_key, secret_key, bucket, object_prefix, compression, file_type, max_retry, retry_interval_sec, use_ssl? |
Azure |
AzureAttributes |
storage_account, sas_token, container, compression, file_type, max_retry, retry_interval_sec, blob_prefix? |
Postgres |
PostgresAttributes |
host, port, username, password, database, schema, table, max_retry, retry_interval_sec, use_ssl? |
Mysql |
MysqlAttributes |
host, port, username, password, database, table, max_retry, retry_interval_sec, use_ssl? |
Mongo |
MongoAttributes |
connection_string, database, collection, max_retry, retry_interval_sec |
Clickhouse |
ClickhouseAttributes |
host, port, username, password, database, table, max_retry, retry_interval_sec, use_ssl? |
Snowflake |
SnowflakeAttributes |
account, warehouse, database, schema, table, username, private_key, max_retry, retry_interval_sec |
Kafka |
KafkaAttributes |
bootstrap_servers, topic, compression, max_retry, retry_interval_sec |
Redis |
RedisAttributes |
host, port, username, password, key, max_retry, retry_interval_sec, use_ssl? |
Wrapper naming per language:
- Rust:
DestinationAttributes::Webhook(WebhookAttributes { .. })etc. - Python:
StreamWebhookDestination(WebhookAttributes(...)),StreamS3Destination(S3Attributes(...)), etc. - Node.js: a discriminated object
{ destination: "webhook", attributes: { ... } }using string discriminators. - Ruby: factory methods on
QuickNodeSdk::DestinationAttributes, e.g.QuickNodeSdk::DestinationAttributes.webhook(url: ..., ...).
Streams methods
create_stream / createStream
Creates a new stream that delivers filtered data to the configured destination. Start from a specific block for backfills or from the tip for real-time streaming. Supports filters, reorg handling, distance-from-tip, elastic batching, notification emails, and extra destinations.
Parameters: CreateStreamParams — required: name, region, network, dataset, start_range (i64), end_range (i64, -1 = follow tip), destination_attributes, plan, threshold_fetch_buffer. Common optional fields: dataset_batch_size, include_stream_metadata, fix_block_reorgs, keep_distance_from_tip, elastic_batch_enabled, filter_function, filter_language, status, notification_email, extra_destinations.
Returns: Stream.
// Rust
let params = builder
.name
.region
.network
.dataset
.start_range
.end_range
.destination_attributes
.plan
.threshold_fetch_buffer
.status
.build;
let stream = qn.streams.create_stream.await?;
# Python
= await
// Node.js
import { StreamDataset, StreamRegion, StreamStatus } from "quicknode-sdk";
const stream = await qn.streams.createStream({
name: "My Stream",
network: "ethereum-mainnet",
dataset: StreamDataset.Block,
region: StreamRegion.UsaEast,
startRange: 24691804,
endRange: 24691904,
destinationAttributes: {
destination: "webhook",
attributes: {
url: "https://webhook.site/...",
maxRetry: 3,
retryIntervalSec: 1,
postTimeoutSec: 10,
compression: "none",
},
},
plan: "growth_plan",
thresholdFetchBuffer: 1000,
status: StreamStatus.Active,
});
# Ruby
dest = QuickNodeSdk::DestinationAttributes.webhook(
url: ,
max_retry: 3,
retry_interval_sec: 1,
post_timeout_sec: 10,
compression:
)
stream = JSON.parse(qn.streams.create_stream(
name: ,
network: ,
dataset: ,
region: ,
start_range: 24691804,
end_range: 24691904,
destination_attributes: dest,
plan: ,
threshold_fetch_buffer: 1000,
status:
))
list_streams / listStreams
Paginated list of streams on the account.
Parameters (all optional): offset (i64), limit (i64), order_by (string), order_direction ("asc" | "desc"), stream_type (string).
Returns: ListStreamsResponse with data: Stream[] and page_info.
// Rust
let resp = qn.streams.list_streams.await?;
# Python
= await
// Node.js
const resp = await qn.streams.listStreams();
# Ruby
resp = JSON.parse(qn.streams.list_streams({}))
get_stream / getStream
Fetches one stream by id.
Parameters: id (string, required).
Returns: Stream.
// Rust
let stream = qn.streams.get_stream.await?;
# Python
= await
// Node.js
const stream = await qn.streams.getStream("stream-id");
# Ruby
stream = JSON.parse(qn.streams.get_stream(id: ))
update_stream / updateStream
Partially updates a stream. Omitted fields are left unchanged.
Parameters: id (string, required); body: any field from CreateStreamParams (all optional).
Returns: updated Stream.
// Rust
let params = UpdateStreamParams ;
let stream = qn.streams.update_stream.await?;
# Python
= await
// Node.js
const stream = await qn.streams.updateStream("stream-id", { name: "Renamed" });
# Ruby
stream = JSON.parse(qn.streams.update_stream(id: , name: ))
delete_stream / deleteStream
Deletes one stream by id.
Parameters: id (string, required).
Returns: nothing.
// Rust
qn.streams.delete_stream.await?;
# Python
await
// Node.js
await qn.streams.deleteStream("stream-id");
# Ruby
qn.streams.delete_stream(id: )
delete_all_streams / deleteAllStreams
Deletes every stream on the account. Destructive and takes no arguments.
Parameters: none.
Returns: nothing.
// Rust
qn.streams.delete_all_streams.await?;
# Python
await
// Node.js
await qn.streams.deleteAllStreams();
# Ruby
qn.streams.delete_all_streams
activate_stream / activateStream
Resumes delivery on a stream from its current position.
Parameters: id (string, required).
Returns: nothing.
// Rust
qn.streams.activate_stream.await?;
# Python
await
// Node.js
await qn.streams.activateStream("stream-id");
# Ruby
qn.streams.activate_stream(id: )
pause_stream / pauseStream
Halts delivery on a stream.
Parameters: id (string, required).
Returns: nothing.
// Rust
qn.streams.pause_stream.await?;
# Python
await
// Node.js
await qn.streams.pauseStream("stream-id");
# Ruby
qn.streams.pause_stream(id: )
test_filter / testFilter
Runs a filter function against a block so it can be validated before being attached to a live stream.
Parameters: network (string, required), dataset (StreamDataset, required), block (string, required), filter_function (string, optional), filter_language (FilterLanguage, optional), address_book_config (optional).
Returns: TestFilterResponse with result and logs.
// Rust
let params = TestFilterParams ;
let resp = qn.streams.test_filter.await?;
# Python
= await
// Node.js
import { StreamDataset } from "quicknode-sdk";
const resp = await qn.streams.testFilter({
network: "ethereum-mainnet",
dataset: StreamDataset.Block,
block: "17811625",
});
# Ruby
resp = JSON.parse(qn.streams.test_filter(
network: ,
dataset: ,
block:
))
get_enabled_count / getEnabledCount
Counts currently enabled (active) streams, optionally filtered by type.
Parameters: stream_type (string, optional).
Returns: EnabledCountResponse with total.
// Rust
let resp = qn.streams.get_enabled_count.await?;
# Python
= await
// Node.js
const resp = await qn.streams.getEnabledCount();
# Ruby
resp = JSON.parse(qn.streams.get_enabled_count({}))
Webhooks Client
Accessed as qn.webhooks. Creates webhooks from filter templates and manages their lifecycle. Backed by https://api.quicknode.com/webhooks/rest/v1/.
Templates and destination
WebhookTemplateId identifies the filter template:
| Variant | Wire value |
|---|---|
EvmWalletFilter |
evmWalletFilter |
EvmContractEvents |
evmContractEvents |
EvmAbiFilter |
evmAbiFilter |
SolanaWalletFilter |
solanaWalletFilter |
BitcoinWalletFilter |
bitcoinWalletFilter |
XrplWalletFilter |
xrplWalletFilter |
HyperliquidWalletEventsFilter |
hyperliquidWalletEventsFilter |
StellarWalletTransactionsSourceAccountFilter |
stellarWalletTransactionsSourceAccountFilter |
TemplateArgs carries the arguments; construct one per template via the factory methods:
| Factory | Argument struct | Fields |
|---|---|---|
evm_wallet_filter |
EvmWalletFilterTemplate |
wallets: string[] |
evm_contract_events |
EvmContractEventsTemplate |
contracts: string[], event_hashes?: string[] |
evm_abi_filter |
EvmAbiFilterTemplate |
abi: string (JSON), contracts: string[] |
solana_wallet_filter |
SolanaWalletFilterTemplate |
accounts: string[] |
bitcoin_wallet_filter |
BitcoinWalletFilterTemplate |
wallets: string[] |
xrpl_wallet_filter |
XrplWalletFilterTemplate |
wallets: string[] |
hyperliquid_wallet_events_filter |
HyperliquidWalletEventsFilterTemplate |
wallets: string[] |
stellar_wallet_transactions_filter |
StellarWalletTransactionsFilterTemplate |
source_accounts: string[] |
WebhookDestinationAttributes: url (required), security_token (optional — auto-generated if omitted), compression (optional — "none" | "gzip").
WebhookStartFrom: Last (resume from last delivered block) or Latest (start from newest).
In Ruby, template_args is passed as a JSON string under the key template_args_json; destination is passed as a JSON string under destination_attributes_json.
Webhooks methods
list_webhooks / listWebhooks
Paginated list of webhooks.
Parameters (all optional): limit (i64), offset (i64).
Returns: ListWebhooksResponse with data: Webhook[] and pageInfo.
// Rust
let resp = qn.webhooks.list_webhooks.await?;
# Python
= await
// Node.js
const resp = await qn.webhooks.listWebhooks();
# Ruby
resp = JSON.parse(qn.webhooks.list_webhooks({}))
get_webhook / getWebhook
Fetches a webhook by id.
Parameters: id (string, required).
Returns: Webhook.
// Rust
let webhook = qn.webhooks.get_webhook.await?;
# Python
= await
// Node.js
const webhook = await qn.webhooks.getWebhook("wh-1");
# Ruby
webhook = JSON.parse(qn.webhooks.get_webhook(id: ))
create_webhook_from_template / createWebhookFromTemplate
Creates a webhook from a predefined filter template.
Parameters: name (required), network (required), destination_attributes (WebhookDestinationAttributes, required), template_args (TemplateArgs, required), notification_email (optional).
Returns: Webhook.
// Rust
let template_args = evm_wallet_filter?;
let params = CreateWebhookFromTemplateParams ;
let webhook = qn.webhooks.create_webhook_from_template.await?;
# Python
= await
// Node.js
import { TemplateArgs } from "quicknode-sdk";
const webhook = await qn.webhooks.createWebhookFromTemplate({
name: "Wallet Webhook",
network: "ethereum-mainnet",
destinationAttributes: { url: "https://webhook.site/..." },
templateArgs: TemplateArgs.evmWalletFilter({
wallets: ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],
}),
});
# Ruby
destination_attributes = JSON.generate({
url: ,
compression:
})
template_args = JSON.generate({
template_id: ,
value: JSON.generate({ wallets: [] })
})
webhook = JSON.parse(qn.webhooks.create_webhook_from_template(
name: ,
network: ,
destination_attributes_json: destination_attributes,
template_args_json: template_args
))
update_webhook / updateWebhook
Partially updates a webhook's name, notification email, and/or destination. If destination_attributes is supplied without security_token, a new token is generated automatically.
Parameters: id (required); body — all optional: name, notification_email, destination_attributes. In Ruby, destination_attributes is passed as a JSON string under the key destination_attributes_json.
Returns: updated Webhook.
// Rust
let params = UpdateWebhookParams ;
let webhook = qn.webhooks.update_webhook.await?;
# Python
= await
// Node.js
const webhook = await qn.webhooks.updateWebhook("wh-1", { name: "Renamed Webhook" });
# Ruby
webhook = JSON.parse(qn.webhooks.update_webhook(id: , name: ))
update_webhook_template / updateWebhookTemplate
Updates the template args (and optionally name, email, destination) on an existing template-backed webhook.
Parameters: webhook_id (required), template_args (required); optional: name, notification_email, destination_attributes.
Returns: updated Webhook.
// Rust
let template_args = evm_wallet_filter?;
let params = UpdateWebhookTemplateParams ;
let webhook = qn.webhooks.update_webhook_template.await?;
# Python
= await
// Node.js
const webhook = await qn.webhooks.updateWebhookTemplate("wh-1", {
templateArgs: TemplateArgs.evmWalletFilter({ wallets: ["0xnewwallet"] }),
});
# Ruby
template_args = JSON.generate({
template_id: ,
value: JSON.generate({ wallets: [] })
})
webhook = JSON.parse(qn.webhooks.update_webhook_template(
webhook_id: ,
template_args_json: template_args
))
delete_webhook / deleteWebhook
Deletes a webhook.
Parameters: id (required).
Returns: nothing.
// Rust
qn.webhooks.delete_webhook.await?;
# Python
await
// Node.js
await qn.webhooks.deleteWebhook("wh-1");
# Ruby
qn.webhooks.delete_webhook(id: )
delete_all_webhooks / deleteAllWebhooks
Deletes every webhook on the account. Destructive and takes no arguments.
Parameters: none.
Returns: nothing.
// Rust
qn.webhooks.delete_all_webhooks.await?;
# Python
await
// Node.js
await qn.webhooks.deleteAllWebhooks();
# Ruby
qn.webhooks.delete_all_webhooks
pause_webhook / pauseWebhook
Pauses a webhook so it stops delivering events.
Parameters: id (required).
Returns: nothing.
// Rust
qn.webhooks.pause_webhook.await?;
# Python
await
// Node.js
await qn.webhooks.pauseWebhook("wh-1");
# Ruby
qn.webhooks.pause_webhook(id: )
activate_webhook / activateWebhook
Activates a paused or new webhook so it resumes delivering events. start_from determines where processing resumes.
Parameters: id (required), start_from (WebhookStartFrom, required — Last or Latest).
Returns: nothing.
// Rust
let params = ActivateWebhookParams ;
qn.webhooks.activate_webhook.await?;
# Python
await
// Node.js
import { WebhookStartFrom } from "quicknode-sdk";
await qn.webhooks.activateWebhook("wh-1", { startFrom: WebhookStartFrom.Latest });
# Ruby
qn.webhooks.activate_webhook(id: , start_from: )
get_enabled_count / getEnabledCount
Counts currently enabled webhooks.
Parameters: none.
Returns: WebhookEnabledCountResponse with total.
// Rust
let resp = qn.webhooks.get_enabled_count.await?;
# Python
= await
// Node.js
const resp = await qn.webhooks.getEnabledCount();
# Ruby
resp = JSON.parse(qn.webhooks.get_enabled_count)
KV Store Client
Accessed as qn.kvstore. Provides two primitives — sets (single string values under a key) and lists (ordered collections of strings under a key). Backed by https://api.quicknode.com/kv/rest/v1/.
Sets
create_set / createSet
Stores a single string value under a key.
Parameters: key (string, required), value (string, required).
Returns: nothing.
// Rust
qn.kvstore.create_set.await?;
# Python
await
// Node.js
await qn.kvstore.createSet({ key: "my-key", value: "hello" });
# Ruby
qn.kvstore.create_set(key: , value: )
get_sets / getSets
Paginated page of key/value entries.
Parameters (all optional): limit (i64), cursor (string).
Returns: GetSetsResponse — { data: KvSetEntry[], cursor: string }.
// Rust
let resp = qn.kvstore.get_sets.await?;
# Python
= await
// Node.js
const resp = await qn.kvstore.getSets();
# Ruby
resp = JSON.parse(qn.kvstore.get_sets({}))
get_set / getSet
Returns the value stored under a key.
Parameters: key (string, required).
Returns: GetSetResponse with value.
// Rust
let resp = qn.kvstore.get_set.await?;
# Python
= await
// Node.js
const resp = await qn.kvstore.getSet("my-key");
# Ruby
resp = JSON.parse(qn.kvstore.get_set(key: ))
bulk_sets / bulkSets
Adds and/or deletes multiple sets in a single request.
Parameters (at least one required): add_sets (map<string,string>, optional), delete_sets (string[], optional).
Returns: nothing.
// Rust
use HashMap;
let mut add_sets = new;
add_sets.insert;
qn.kvstore.bulk_sets.await?;
# Python
await
// Node.js
await qn.kvstore.bulkSets({
addSets: { k1: "v1" },
deleteSets: ["old-key"],
});
# Ruby
qn.kvstore.bulk_sets(add_sets: { => }, delete_sets: [])
delete_set / deleteSet
Deletes a single set.
Parameters: key (string, required).
Returns: nothing.
// Rust
qn.kvstore.delete_set.await?;
# Python
await
// Node.js
await qn.kvstore.deleteSet("my-key");
# Ruby
qn.kvstore.delete_set(key: )
Lists
create_list / createList
Creates a list under a key, seeded with the initial items.
Parameters: key (string, required), items (string[], required).
Returns: nothing.
// Rust
qn.kvstore.create_list.await?;
# Python
await
// Node.js
await qn.kvstore.createList({ key: "my-list", items: ["0xabc", "0xdef"] });
# Ruby
qn.kvstore.create_list(key: , items: [, ])
get_lists / getLists
Paginated page of list keys.
Parameters (all optional): limit (i64), cursor (string).
Returns: GetListsResponse — { data: { keys: string[] }, cursor: string }.
// Rust
let resp = qn.kvstore.get_lists.await?;
# Python
= await
// Node.js
const resp = await qn.kvstore.getLists();
# Ruby
resp = JSON.parse(qn.kvstore.get_lists({}))
get_list / getList
Paginated page of items for a specific list.
Parameters: key (string, required); optional limit (i64), cursor (string).
Returns: GetListResponse — { data: { items: string[] }, cursor: string }.
// Rust
let resp = qn.kvstore.get_list.await?;
# Python
= await
// Node.js
const resp = await qn.kvstore.getList("my-list");
# Ruby
resp = JSON.parse(qn.kvstore.get_list(key: ))
update_list / updateList
Adds and/or removes items in a single operation.
Parameters: key (string, required); optional: add_items (string[]), remove_items (string[]).
Returns: nothing.
// Rust
qn.kvstore.update_list.await?;
# Python
await
// Node.js
await qn.kvstore.updateList("my-list", {
addItems: ["0x456"],
removeItems: ["0xabc"],
});
# Ruby
qn.kvstore.update_list(key: , add_items: [], remove_items: [])
add_list_item / addListItem
Appends a single item to a list.
Parameters: key (string, required), item (string, required).
Returns: nothing.
// Rust
qn.kvstore.add_list_item.await?;
# Python
await
// Node.js
await qn.kvstore.addListItem("my-list", { item: "0x123" });
# Ruby
qn.kvstore.add_list_item(key: , item: )
list_contains_item / listContainsItem
Checks whether a list contains a specific item.
Parameters: key (string, required), item (string, required).
Returns: ListContainsItemResponse with exists: bool.
// Rust
let resp = qn.kvstore.list_contains_item.await?;
# Python
= await
// Node.js
const resp = await qn.kvstore.listContainsItem("my-list", "0x123");
# Ruby
resp = JSON.parse(qn.kvstore.list_contains_item(key: , item: ))
delete_list_item / deleteListItem
Removes a single item from a list.
Parameters: key (string, required), item (string, required).
Returns: nothing.
// Rust
qn.kvstore.delete_list_item.await?;
# Python
await
// Node.js
await qn.kvstore.deleteListItem("my-list", "0x123");
# Ruby
qn.kvstore.delete_list_item(key: , item: )
delete_list / deleteList
Deletes a list and all of its items.
Parameters: key (string, required).
Returns: nothing.
// Rust
qn.kvstore.delete_list.await?;
# Python
await
// Node.js
await qn.kvstore.deleteList("my-list");
# Ruby
qn.kvstore.delete_list(key: )
Error Handling
Every binding exposes a typed exception hierarchy derived from the core SdkError
enum (crates/core/src/errors.rs). Catch the base class (QuickNodeError /
QuickNodeSdk::Error / SdkError) for any SDK-originated failure, or a specific
subclass to branch on transport vs. API semantics.
| Logical class | When it fires | Extra fields |
|---|---|---|
QuickNodeError |
base class; catches everything below | — |
ConfigError |
invalid config or URL surfaced at construction time | — |
HttpError |
transport failure that isn't a timeout/connect | — |
TimeoutError |
request timed out (subclass of HttpError) |
— |
ConnectionError |
connection refused / DNS / TLS (subclass of HttpError) |
— |
ApiError |
non-2xx HTTP response | status, body |
DecodeError |
2xx response but JSON parse failed | body |
Per-language names:
- Rust — pattern-match on
SdkError { Http, Api, Decode, UrlParse, Config }; useerr.http_kind()to classifyHttpintoTimeout,Connect, orOther. - Python —
QuickNodeError,ConfigError,HttpError,TimeoutError,ConnectionError,ApiError,DecodeError(importable fromsdk). - Node.js — same class names, importable from
@quicknode/sdk, all extendError. - Ruby —
QuickNodeSdk::Error,QuickNodeSdk::ConfigError,QuickNodeSdk::HttpError,QuickNodeSdk::TimeoutError,QuickNodeSdk::ConnectionError,QuickNodeSdk::ApiError,QuickNodeSdk::DecodeError; all extendStandardError. Hash-key validation still raisesArgumentError.
// Rust
match qn.admin.show_endpoint.await
# Python
await
// Node.js
import { ApiError, TimeoutError } from "@quicknode/sdk";
try {
await qn.admin.showEndpoint("missing");
} catch (e) {
if (e instanceof ApiError && e.status === 404) console.error("not found:", e.body);
else if (e instanceof TimeoutError) console.error("timed out");
else throw e;
}
# Ruby
begin
qn.admin.show_endpoint(id: )
rescue QuickNodeSdk::ApiError => e
warn if e.status == 404
rescue QuickNodeSdk::TimeoutError
warn
end
Development
Prerequisites
Build Commands
Use the commands in the Justfile for the setup and build commands.
# Core library
# Python (from project root)
# Node.js (from npm/)
# Ruby
# Rust
Testing
Runs the Rust unit tests for quicknode-sdk using wiremock to mock HTTP responses — no API key required.
Examples
# Rust
QN_SDK__API_KEY=replaceme
# Python
QN_SDK__API_KEY=replaceme
QN_SDK__API_KEY=replaceme
# Node.js
&& QN_SDK__API_KEY=replaceme
&& QN_SDK__API_KEY=replaceme
# Ruby (build first, then run)
QN_SDK__API_KEY=replaceme
QN_SDK__API_KEY=replaceme
QN_SDK__API_KEY=replaceme
Releasing
The Rust crate (quicknode-sdk on crates.io) versions independently from the Python, Node, and Ruby bindings. Its version lives in crates/core/Cargo.toml; the bindings share the workspace version in the root Cargo.toml.
Rust crate only (crates.io)
# 1. Bump the version in crates/core/Cargo.toml (e.g. 0.1.0 → 0.1.0-alpha.5)
# Pre-release identifiers use SemVer 2.0 syntax: MAJOR.MINOR.PATCH-<id>.<N>
# Examples: 0.1.0-alpha.4, 0.2.0-beta.1, 0.2.0-rc.1
# 2. Commit and push
# 3. Validate the tarball (no upload)
# 4. Publish (requires `cargo login` with a crates.io token)
The first publish claims the quicknode-sdk name permanently. Published versions are immutable — you cannot overwrite or delete them (only cargo yank, which hides but doesn't remove).
All bindings together (Python / Node / Ruby)
macOS (Apple Silicon) artifacts are built locally rather than on GitHub Actions to avoid the ~10× runner cost. Linux artifacts are still built by CI on tag push.
# 1. Bump versions, commit, tag
# 2. Push
&&
# 3. Wait for CI to finish and publish the GitHub release with Linux artifacts.
# 4. Build macOS arm64 artifacts locally and append them to the release
Step 4 requires the gh CLI authenticated to the repo. Intel macOS (x86_64-apple-darwin) is not shipped — users on Intel Macs install from source.
just release does not bump the Rust crate version (that's managed separately in crates/core/Cargo.toml). If you want the Rust crate to move in lockstep with a binding release, bump it manually in the same commit.
License
MIT