Logo

ZKsync RPC Endpoints & API | OnFinality

The Elastic Network

通过 OnFinality 的弹性 API 几秒钟内连接到 ZKsync,每年提供 99.99% 的高可用性。

The Elastic Network

连接到公共端点

以下示例使用的是公共 API 接口*。该接口仅适用于测试。为避免限速和服务中断, 立即注册 来获取您专属的API key。
curl -H 'content-type:application/json' -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_blockNumber"}' 'https://zksync.api.onfinality.io/public'
https://zksync.api.onfinality.io/public
wss://zksync.api.onfinality.io/public-ws

* 公共接口有速率限制

API 服务

API 功能

Archive

ZKsync RPC Endpoints

ZKsync is an Ethereum Layer 2 scaling solution that uses zero-knowledge rollups (ZK-rollups) to provide high throughput, low transaction costs, and full EVM compatibility. As an elastic network, ZKsync enables developers to build scalable dApps, DeFi protocols, wallets, and analytics tools with the security of Ethereum.

Why Use ZKsync RPC?

Developers connect to ZKsync via JSON-RPC endpoints to read blockchain data, submit transactions, and interact with smart contracts. Common use cases include:

  • dApps and wallets: Enable users to send transactions and query balances.
  • DeFi products: Monitor liquidity pools, execute swaps, and fetch price data.
  • Analytics tools: Retrieve historical data for dashboards and reporting.
  • Bots and backend services: Automate on-chain interactions and index events.

ZKsync RPC on OnFinality

OnFinality provides managed API endpoints for ZKsync mainnet, supporting both HTTP and WebSocket transports. Our infrastructure is designed for production workloads, offering:

  • Archive access: Query historical state and past blocks for deep analytics.
  • Reliable connectivity: Redundant nodes and global points of presence.
  • Usage analytics: Monitor request volume, errors, and latency through the OnFinality dashboard.

How to Connect

  1. Create or sign in to your OnFinality account.
  2. Select ZKsync from the supported networks list.
  3. Create an API endpoint (shared or dedicated).
  4. Test your endpoint with eth_blockNumber.
  5. Monitor usage and move critical traffic to production.

Public vs. Authenticated RPC

Public ZKsync RPC endpoints are suitable for lightweight testing but often lack rate-limit transparency and reliability guarantees. OnFinality's authenticated endpoints provide clearer limits, request visibility, and a path to higher-capacity plans or dedicated nodes.

Key Facts

  • Network: ZKsync Mainnet (Chain ID: 324)
  • Protocol: EVM JSON-RPC
  • Transports: HTTP and WebSocket
  • Advanced access: Archive support available
  • Common users: Production dApps, DeFi, analytics, wallets, bots

Get Started

Ready to build on ZKsync? Create an OnFinality account and get your API key in minutes.

API 服务
无限请求,高速速率限制
强大的 API 分析功能
99.99% 在线率
通过 HTTPS 或 websocket 连接
全球去中心化服务器托管
全archive节点访问不另收费
价格

计算您的费用

按需付费,无隐藏成本。

Million Standard Requests
0100M200M300M400M
Total Cost
$49/ month

Recommended Plan: GROWTH

Continue with this plan

Latest ZKsync Updates!

OnFinality boosts ZKsync with lightning fast RPC endpoint

Mar 25,2025

OnFinality boosts ZKsync with lightning fast RPC endpoint

OnFinality provides easy to use, reliable and scalable API endpoints for builders to deploy and run their dApps on ZKsync quickly and easily!

永远不用担心基础设施

OnFinality 消除了 DevOps 的繁重工作,让您能够更聪明、更快地构建。

开始