Logo
New RPC users get 35% off their first monthView the offer
Optimism logo

Optimism RPC Endpoints for OP Mainnet

Optimism is a low-cost and lightning-fast Ethereum L2 blockchain

Connect to OP Mainnet through reliable Optimism RPC endpoints from OnFinality. Use HTTPS or WebSocket to query blocks, balances, transactions and smart contracts, submit transactions, subscribe to live blockchain events, and access historical state through Archive-enabled infrastructure.

For advanced Optimism workloads, OnFinality also provides Trace and Debug APIs, RPC analytics, scalable rate limits, and dedicated node infrastructure for production applications.

Chain ID10
CurrencyETH
Sign up for a Free Plan to unlock up to 40 req/sec and API Usage and Performance Insights. Get Started

Public endpoint rate limit: 5 req/sec

Connect to Optimism RPC
curl -H 'Content-Type: application/json' -d '{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber"}' 'https://optimism.api.onfinality.io/public'
curl -H 'Content-Type: application/json' -d '{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber"}' 'https://optimism.api.onfinality.io/public'
HTTPs
https://optimism.api.onfinality.io/public
https://optimism.api.onfinality.io/public
Websocket
wss://optimism.api.onfinality.io/public-ws
wss://optimism.api.onfinality.io/public-ws

Go to Growth Plan

  • High Performance
  • Powerful RPC Analytics
  • Up to 500 rps
  • No daily response limit
  • Priority Support
  • Decentralized Servers
Get Started

OP Mainnet RPC details

Item
Value
Network
OP Mainnet
Also Known As
Optimism
Chain ID
10
Currency
ETH
Protocol
EVM JSON-RPC
HTTPS
Supported
WebSocket
Supported
Archive Access
Supported
Trace / Debug
Supported on Paid Plans
Public Rate Limit
5 req/sec
Free Plan
Up to 40 req/sec
Regions
Hong Kong / France / N. Virginia

Optimism HTTPS RPC

Connect to OP Mainnet over HTTPS for standard EVM JSON-RPC reads, transaction submission, contract calls, and historical data queries.

https://optimism.api.onfinality.io/public

Optimism WebSocket RPC

Use the persistent WebSocket endpoint for subscriptions and event-driven applications that need live blockchain activity.

wss://optimism.api.onfinality.io/public-ws

Real-Time Optimism WebSocket RPC

Connect to OP Mainnet through persistent WebSocket RPC for real-time blockchain applications. Subscribe to new blocks, logs, and onchain events without continuously polling an HTTP endpoint.

eth_subscribe eth_unsubscribe eth_newFilter eth_newBlockFilter eth_newPendingTransactionFilter eth_getFilterChanges

The Optimism Foundation public RPC does not support standard WebSocket connections. OnFinality provides both HTTPS and WebSocket access for applications that need real-time OP Mainnet data.

Optimism Archive RPC

Query historical OP Mainnet state through OnFinality's Archive-enabled Optimism RPC infrastructure. Access historical blocks, balances, smart contract state, transactions, receipts, and event logs without operating your own archive node.

Historical Logs

Use eth_getLogs to retrieve historical contract events for DeFi analytics, accounting, transaction analysis, indexers, explorers, and audit tools.

eth_getLogs

Optimism Trace and Debug APIs

Inspect OP Mainnet transaction execution, debug failed contract calls, analyse internal transactions, and build advanced analytics using supported Trace and Debug APIs.

Trace APIs

trace_block trace_call trace_callMany trace_filter trace_replayTransaction trace_replayBlockTransactions

Debug APIs

debug_traceTransaction debug_traceCall debug_traceBlockByHash debug_traceBlockByNumber

Trace and Debug APIs are available on supported paid plans.

Supported Optimism RPC Methods

Use EVM-compatible JSON-RPC methods to read OP Mainnet state, query smart contracts, submit transactions, retrieve logs, subscribe to events, and inspect execution.

Blocks and Chain State

eth_blockNumber eth_chainId eth_getBlockByHash eth_getBlockByNumber eth_getBlockReceipts

Accounts and Smart Contracts

eth_getBalance eth_call eth_estimateGas eth_getCode eth_getStorageAt

Transactions

eth_sendRawTransaction eth_getTransactionByHash eth_getTransactionReceipt eth_getTransactionCount

Logs and Real-Time Events

eth_getLogs eth_subscribe eth_getFilterChanges

Trace and Debug

trace_block trace_call trace_filter debug_traceTransaction debug_traceCall
View all supported Optimism RPC methods →

Query OP Mainnet Gas and Transaction Costs

Use standard EVM RPC methods such as eth_estimateGas, eth_gasPrice, and eth_feeHistory for OP Mainnet transaction workflows. Applications that need total transaction cost estimates should also account for the OP Stack L1 data fee.

eth_estimateGas eth_gasPrice eth_feeHistory

Build on OP Mainnet with OnFinality

DeFi Applications

Query contract state, pools, balances, transactions and events while submitting transactions through EVM-compatible OP Mainnet RPC.

Wallets and Exchanges

Query ETH and token balances, estimate transaction costs, submit signed transactions, retrieve receipts, and monitor deposits and withdrawals.

Real-Time Applications

Use WebSocket subscriptions to monitor new blocks, contract logs and live OP Mainnet activity without continuous HTTP polling.

Indexers and Analytics

Combine Archive access, eth_getLogs, transactions and receipts to build historical datasets, dashboards and blockchain analytics.

Smart Contract Debugging

Inspect transaction execution using Trace and Debug APIs for contract development, incident investigation and advanced analytics.

OP Mainnet and OP Sepolia RPC

OP MainnetOP Sepolia
Chain ID1011155420
CurrencyETHETH
HTTPSSupportedSupported
WebSocketSupportedSupported
EnvironmentProductionDevelopment / QA
Explore OP Sepolia RPC →

Dedicated Optimism Nodes

Move from shared Optimism RPC access to dedicated OP Mainnet nodes when your workload needs isolated resources, sustained throughput, intensive Archive or Trace queries, or greater operational control.

Suitable for

  • High-volume RPC
  • Exchanges
  • Indexers
  • Archive-heavy analytics
  • Trace workloads
  • Latency-sensitive backends
  • Infrastructure isolation
Deploy a Dedicated Optimism Node →

Build faster with Optimism RPC endpoints

Use OnFinality's Optimism RPC APIs to connect wallets, dApps, dashboards, bots, and backend services without operating your own node from day one.

Public endpoint testing

Start with the Optimism public RPC endpoint for lightweight checks, prototypes, and quick integration tests.

Authenticated API access

Move production traffic to authenticated endpoints when you need clearer limits, analytics, and operational visibility.

Standard RPC methods

Query Optimism blocks, transactions, balances, events, and chain state through HTTP and WebSocket workflows.

Operate Optimism infrastructure with more control

Production teams need more than an endpoint URL. They need observability, predictable capacity, and a path from shared RPC access to isolated infrastructure.

Request visibility

Track usage patterns and response activity so your team can understand traffic growth before it becomes an incident.

Dedicated node path

Use dedicated Optimism nodes when your workload needs isolated resources, custom operations, or stronger capacity planning.

Archive and historical data

Plan for archive access when analytics, audits, indexers, or advanced app features need older Optimism state.

Choose the right Optimism RPC setup

Different Optimism products need different infrastructure. OnFinality gives teams a practical path from public RPC testing to production-grade API and node operations.

For prototypes

Use public RPC for simple reads, connection checks, and early experiments where strict performance guarantees are not required.

For live apps

Use authenticated API endpoints when users depend on stable request handling, monitoring, and scalable access.

For heavy workloads

Use dedicated nodes for sustained traffic, latency-sensitive services, validator tooling, exchange systems, and indexing pipelines.

Never Worry about Infrastructure Again

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

Get Started