Logo
Nuevos usuarios de RPC: 35% de descuento el primer mesVer oferta
Optimism logo

Optimism RPC Endpoints for OP Mainnet

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
Regístrate en el Free Plan para desbloquear hasta 40 req/sec y obtener API Usage and Performance Insights. Empezar

Límite del endpoint público: 5 req/sec

Connect to OP Mainnet 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

Pasa a Growth Plan

  • Alto rendimiento
  • Analítica RPC potente
  • Hasta 500 rps
  • Sin límite diario de respuestas
  • Soporte prioritario
  • Servidores descentralizados
Empezar

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 →

Nunca te preocupes por la infraestructura nuevamente

OnFinality elimina la carga pesada de DevOps para que puedas construir de forma más inteligente y rápida.

Comenzar