Logo

ZKsync RPC Endpoints & API

The Elastic Network

Chain ID324
CurrencyETH

ZKsync RPC access through OnFinality, with archive data for trading systems, analytics, and production apps.

The Elastic Network

Create RPC Endpoint

ZKsync RPC Endpoint

The below example uses the public API endpoint*. This endpoint is only suitable for testing. To avoid rate limiting and service interruption, sign up now to get your own API key.
Example CURL
curl -H 'content-type:application/json' -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_blockNumber"}' 'https://zksync.api.onfinality.io/public'
curl -H 'content-type:application/json' -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_blockNumber"}' 'https://zksync.api.onfinality.io/public'
HTTPs
https://zksync.api.onfinality.io/public
https://zksync.api.onfinality.io/public
Websocket
wss://zksync.api.onfinality.io/public-ws
wss://zksync.api.onfinality.io/public-ws

* The public endpoint is rate limited

RPC API Service

RPC API Features

Archive

PRICING

Calculate Your Costs

Only pay for what you need.

Million Standard Requests
0100M200M300M400M
Total Cost
$49/ month

Recommended Plan: GROWTH

Continue with this plan

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.

ZKsync RPC and developer resources

Most teams looking for ZKsync RPC need to answer a practical question: can this endpoint support the app, wallet, analytics job, or backend service they are building?

Best fit: mainnet production workflows for trading systems, analytics, and production apps.

What builders usually check first:

  • Read current chain state for apps, dashboards, wallets, and backend services.
  • Submit transactions and monitor confirmations from Ethereum-compatible tools.
  • Query logs, receipts, and historical state when indexers or analytics pipelines need more than the latest block.
  • Debug contract behaviour with trace data where the network supports it.

Supported capability notes:

  • Authenticated ZKsync RPC/API access for trading systems, analytics, and production apps.
  • HTTP plus WebSocket connectivity for app, backend, and integration workflows.
  • Historical data access for analytics, audits, and state lookups.

Decision notes:

  • Environment: mainnet. Protocol family: EVM JSON-RPC.
  • HTTP plus WebSocket connectivity is listed for supported app and backend workflows.
  • Archive support is available for historical state or older chain-data queries.

A quick connection check usually starts with eth_blockNumber, then moves into the exact methods your wallet, dashboard, bot, indexer, or backend service needs.

Planning the next step:

  • Shared RPC is a practical starting point for integration, prototypes, dashboards, and many app backends.
  • If your product becomes traffic-heavy or operationally sensitive, review the available upgrade path before relying on a single access pattern.

Next steps:

RPC API SERVICE
Reliable RPC endpoints with high rate limits
Powerful RPC request analytics
99.99% uptime
Connect via HTTPS or websocket
Decentralised servers hosted globally
Full archive access at no extra cost

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started