---
title: "Optimism API"
description: "Optimism Core RPC API（HTTPS 与 WSS）"
url: "https://blockreq.com/docs/zh-cn/build/api-reference/optimism/"
---

# Optimism API

Optimism 端点使用 EVM JSON-RPC Core API。该路由只暴露 Optimism 的 EVM 方法面，不混入非 EVM 协议。

## Endpoint

| Item | Value |
| --- | --- |
| Network | Optimism Mainnet |
| Protocol | EVM JSON-RPC 2.0 |
| Chain ID | `10` (`0xa`) |
| Public HTTPS | `https://optimism-rpc.blockreq.com/v1/rpc/public` |
| Private HTTPS | `https://optimism-rpc.blockreq.com/v1/rpc/BRQ1P0000000000000000000000000000000000000000000000000000000` |
| WSS | `wss://optimism-rpc.blockreq.com/v1/rpc/BRQ1P0000000000000000000000000000000000000000000000000000000`，启用时可用 |

## Core Methods

Optimism 复用 [EVM JSON-RPC 方法表](https://blockreq.com/docs/zh-cn/build/api-reference/evm-methods/index.md)，覆盖 core reads、transactions、filters、subscriptions 和 archive state。

| Capability | Methods |
| --- | --- |
| Latest state | `eth_chainId`, `eth_blockNumber`, `eth_call`, `eth_getBalance` |
| Historical state | 旧区块 `eth_call`, `eth_getStorageAt`, `eth_getTransactionCount` |
| History/index | `eth_getLogs`, `eth_getTransactionByHash`, `eth_getTransactionReceipt` |

## Proof、Debug 与 Trace

BlockReq 目前不提供 Optimism 上 `eth_getProof`、`debug_*` 和 `trace_*` 的文档，也不保证其可用。
