跳转至主要内容

SDK

更新于
Jul 14, 2026

概述

The SDK is a single SDK for working with Quicknode product APIs from the language you already use: Rust, Python, Node.js, and Ruby.

Use it to build Quicknode product workflows, operational services, scripts, and AI agents that need typed access to:


  • Admin API: Manage endpoints, usage, billing, teams, endpoint security, rate limits, logs, metrics, and account tags.
  • RPC: Make on-chain JSON-RPC calls to any supported network without provisioning an endpoint.
  • Streams: Create, update, pause, activate, test, and delete Streams.
  • Webhooks: Create and manage webhook subscriptions from Quicknode webhook templates.
  • Key-Value Store: Store and retrieve sets and lists for application state, stream filters, watchlists, cursors, and agent memory.
  • SQL 浏览器:对已建立索引的区块链数据运行 SQL 查询,并检索表结构。

When to use the SDK

Use the SDK when you want one consistent client for Quicknode product APIs, especially when your app or agent needs to coordinate multiple products in one workflow.

常见的工作流程包括:


  • Create or manage endpoints with the Admin API.
  • Make on-chain JSON-RPC calls to any supported network.
  • 创建一个流,并将经过过滤的链上数据传输到 webhook 接收端。
  • 将处理状态或关注列表存储在键值存储中。
  • Create webhooks from templates and manage their lifecycle.
  • 使用 SQL Explorer 对已建立索引的区块链数据执行 SQL 查询。
  • Build agent workflows that can inspect account state, provision resources, and clean up test infrastructure.

软件包

语言包装安装
Node.js / TypeScript@quicknode/sdknpm install @quicknode/sdk
Pythonquicknode-sdkpip install quicknode-sdk
Rustquicknode-sdkcargo add quicknode-sdk --features rust
Rubyquicknode_sdkgem install quicknode_sdk

平台支持

The SDK is built around a shared Rust core with bindings for specific languages. The core compiles to native libraries for each supported platform, giving you predictable performance and a small dependency footprint. The trade-off is that we publish binaries for a specific set of targets rather than running in every environment our host languages support.

支持的目标

已发布以下平台的预编译原生模块:

平台目标
Linux(glibc)x86_64、aarch64(基于 glibc 2.17 及以上版本)(manylinux2014)
Linux (musl)Alpine 及其他 musl 发行版上的 x86_64、aarch64
macOSApple Silicon (arm64)

Linux glibc 二进制文件是基于 glibc 2.17 构建的,因此可在 2014 年及以后发布的任何发行版上运行,包括 RHEL 7 及以上版本、Ubuntu 14.04 及以上版本、Debian 8 及以上版本、Amazon Linux 2 及以上版本、SLES 12 及以上版本以及 Fedora 19 及以上版本。

不支持


  • Browsers: The SDK is not browser-compatible. It uses a Rust core through native bindings, which require Node.js or another runtime that supports native add-ons. Standard browser bundles cannot load these bindings.
  • Windows:未发布预编译二进制文件。WSL2 运行正常,是 Windows 开发者的推荐方案。
  • Intel macOS:仅限 Apple Silicon。
  • 较旧的 Linux 发行版:低于 glibc 最低版本要求:RHEL/CentOS 6(glibc 2.12)、Debian 7(glibc 2.13)、Ubuntu 12.04(glibc 2.15)、SLES 11(glibc 2.11)。

On an unsupported platform, importing the SDK fails fast at load time with an error listing the available targets. The failure surfaces at install or import, not at first call.

产品客户

Construct the SDK once, then use the product clients exposed from that shared configuration.

客户目的REST API
管理员端点、团队、使用情况、日志、计费、指标、安全性和速率限制https://api.quicknode.com/v0/
rpcOn-chain JSON-RPC calls to any supported network via Tooling AccessAccount Tooling Access endpoint
streamsStreams creation, updates, lifecycle, and filter testinghttps://api.quicknode.com/streams/rest/v1/
webhooksWebhook 模板、目标、生命周期和计数https://api.quicknode.com/webhooks/rest/v1/
kvstore用于持久化状态的集合和列表https://api.quicknode.com/kv/rest/v1/
sql针对已建立索引的区块链数据执行的 SQL 查询https://api.quicknode.com/sql/rest/v1/

The SDK entry point is QuicknodeSdk 在每种语言的绑定中。Ruby 将其暴露为 QuicknodeSdk::SDK.

SQL Explorer 方法

sql 客户端提供了两种方法:

  • query(sql, clusterId): 对已建立索引的区块链数据执行 SQL 查询。返回指定类型的行以及查询统计信息(信用点、扫描的行数、读取的字节数)。
  • getSchema(clusterId): 获取集群的表结构。
const qn = new QuicknodeSdk();

// Run a SQL query
const resp = await qn.sql.query(
"SELECT action_type, user FROM hyperliquid_system_actions LIMIT 3",
"hyperliquid-core-mainnet"
);
console.log(`${resp.rows} rows, ${resp.credits} credits`);

// Get the schema for a cluster
const schema = await qn.sql.getSchema("hyperliquid-core-mainnet");

身份验证

Quicknode dashboard, then configure the SDK with the QN_SDK__API_KEY 环境变量。

导出 QN_SDK__API_KEY="您的API密钥"

The SDK also supports base URL overrides for local development, staging, and agent sandboxes:

环境变量默认
QN_SDK__ADMIN__BASE_URLhttps://api.quicknode.com/v0/
QN_SDK__STREAMS__BASE_URLhttps://api.quicknode.com/streams/rest/v1/
QN_SDK__WEBHOOKS__BASE_URLhttps://api.quicknode.com/webhooks/rest/v1/
QN_SDK__KVSTORE__BASE_URLhttps://api.quicknode.com/kv/rest/v1/
QN_SDK__SQL__BASE_URLhttps://api.quicknode.com/sql/rest/v1/
QN_SDK__HTTP__TIMEOUT_SECS30

For agents

The SDK is designed to be useful for humans and agents. Agents can initialize one SDK handle, reuse the same credentials across product clients, and rely on typed method inputs and responses instead of composing raw REST calls for each workflow.

下一步


我们 ❤️ 反馈

Share feedback on missing methods, naming, examples, and agent workflows so we can keep improving the SDK.

分享此文档