Chainstack Optimism Node API
Chainstack-managed Optimism mainnet and Sepolia JSON-RPC nodes with Flashblocks preconfirmation support (250 ms). 48 documented eth_/op_ methods.
Chainstack-managed Optimism mainnet and Sepolia JSON-RPC nodes with Flashblocks preconfirmation support (250 ms). 48 documented eth_/op_ methods.
openapi: 3.0.3
info:
title: Chainstack Optimism Node API
version: 1.0.0
description: Chainstack-managed RPC node API for the Optimism blockchain. Endpoints follow the canonical JSON-RPC over HTTPS
interface for the network. Authenticate against your Chainstack node's per-node URL (e.g. https://nd-XXX-XXX-XXX.p2pify.com/<key>).
Merged from the Chainstack Developer Portal per-method fragments at https://github.com/chainstack/dev-portal/tree/main/openapi/optimism_node_api.
contact:
name: Chainstack API Support
email: [email protected]
license:
name: Chainstack Terms
url: https://chainstack.com/terms-of-service/
servers:
- url: https://{node_id}.p2pify.com/{api_key}
description: Chainstack-managed node endpoint
variables:
node_id:
default: nd-000-000-000
description: Your Chainstack node identifier
api_key:
default: <api-key>
description: Per-node access key
tags:
- name: General
paths:
/debug_getModifiedAccountsByHash:
post:
tags:
- General
summary: debug_getModifiedAccountsByHash
operationId: getModifiedAccountsByHash
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_getModifiedAccountsByHash
id:
type: integer
default: 1
params:
type: array
items:
type: string
default:
- '0x8625622df3d1304e86f9e0a7f78adba128940b8829d95bf7866667b261934f6d'
responses:
'200':
description: A list of accounts modified in the specified block
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: array
items:
type: string
description: The addresses of the modified accounts.
/debug_getModifiedAccountsByNumber:
post:
tags:
- General
summary: debug_getModifiedAccountsByNumber
operationId: getModifiedAccountsByNumber
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_getModifiedAccountsByNumber
id:
type: string
default: '1'
params:
type: array
default:
- '0x6eee4bc'
- '0x6eee4bd'
items:
type: string
responses:
'200':
description: A list of accounts modified between the two block numbers
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: string
result:
type: array
items:
type: string
description: The addresses of the modified accounts.
/debug_storageRangeAt:
post:
tags:
- General
summary: debug_storageRangeAt
operationId: getStorageRangeAt
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_storageRangeAt
id:
type: integer
default: 1
params:
type: array
items:
oneOf:
- type: string
- type: integer
default:
- '0x00e80e42fdb4bc373a520c376091421452d26c57e67615f27a7d0fc8e47f1853'
- 5
- '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'
- '0x00000000000000000000000000000000'
- 2
responses:
'200':
description: Storage data for the specified range
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: object
properties:
storage:
type: object
additionalProperties: true
complete:
type: boolean
description: The storage entries and a flag indicating if the storage is complete.
/debug_traceBlockByHash:
post:
tags:
- General
summary: debug_traceBlockByHash
operationId: traceBlockByHash
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_traceBlockByHash
id:
type: integer
default: 1
params:
type: array
items:
type: string
default:
- '0xf743b97fb82f007654f7832e88659c6d0bca832ad8bdb9902370fd301d81ddb3'
responses:
'200':
description: Detailed execution traces for all transactions in the specified block
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: array
items:
type: object
description: An array of execution traces for each transaction in the block.
/debug_traceBlockByNumber:
post:
tags:
- General
summary: debug_traceBlockByNumber
operationId: traceBlockByNumber
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_traceBlockByNumber
id:
type: integer
default: 1
params:
type: array
items:
type: string
default:
- '0x6eee7bc'
responses:
'200':
description: Detailed execution traces for all transactions in the specified block
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: array
items:
type: object
description: An array of execution traces for each transaction in the block.
/debug_traceCall:
post:
tags:
- General
summary: Execute a call and retrieve a detailed execution trace
operationId: traceCall
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_traceCall
id:
type: integer
default: 1
params:
type: array
description: Parameters for the call
default:
- to: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'
gasPrice: '0x7896e72a'
data: '0x70a08231000000000000000000000000f977814e90da44bfa03b6295a0616a897441acec'
- latest
responses:
'200':
description: Detailed execution trace of the call
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: object
properties:
structLogs:
type: array
items:
type: object
description: An array of execution steps (opcodes) taken by the call.
gas:
type: integer
description: The gas provided by the call.
returnValue:
type: string
description: The return value of the call, if any.
gasUsed:
type: integer
description: The total gas used by the call.
failed:
type: boolean
description: Indicates whether the call failed.
/debug_traceCallMany:
post:
tags:
- General
summary: Execute multiple calls and retrieve detailed execution traces
operationId: traceCallMany
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_traceCallMany
id:
type: integer
default: 1
params:
type: array
description: Parameters for the call
default:
- - transactions:
- from: '0xacD03D601e5bB1B275Bb94076fF46ED9D753435A'
to: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'
gas: '0xf4240'
gasPrice: '0x7896e72a'
data: '0xa9059cbb000000000000000000000000bc0E63965946815d105E7591407704e6e1964E590000000000000000000000000000000000000000000000000000000005f5e100'
- to: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'
gasPrice: '0x7896e72a'
data: '0x70a08231000000000000000000000000bc0E63965946815d105E7591407704e6e1964E59'
blockOverride:
blockNumber: '0x6eee101'
- blockNumber: '0x6eee101'
transactionIndex: 1
- {}
responses:
'200':
description: Detailed execution traces of the calls
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: array
items:
type: object
properties:
structLogs:
type: array
items:
type: object
properties:
pc:
type: integer
op:
type: string
gas:
type: integer
gasCost:
type: integer
depth:
type: integer
stack:
type: array
memory:
type: array
gas:
type: integer
returnValue:
type: string
gasUsed:
type: integer
failed:
type: boolean
/debug_traceTransaction:
post:
tags:
- General
summary: debug_traceTransaction
operationId: traceTransaction
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: debug_traceTransaction
id:
type: integer
default: 1
params:
type: array
items:
type: string
default:
- '0x2f6ff16a96580e1d51b91314c1bdf9339f2f7ce0e7a22228bbc65f419dd7be51'
responses:
'200':
description: Detailed execution trace of the specified transaction
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: object
properties:
structLogs:
type: array
items:
type: object
description: An array of execution steps (opcodes) taken by the transaction.
gas:
type: integer
description: The gas provided by the transaction.
returnValue:
type: string
description: The return value of the transaction, if any.
gasUsed:
type: integer
description: The total gas used by the transaction.
failed:
type: boolean
description: Indicates whether the transaction failed.
description: The detailed execution trace of the transaction.
/eth_blockNumber:
post:
tags:
- General
summary: eth_blockNumber
operationId: blockNumber
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_blockNumber
id:
type: integer
default: 1
responses:
'200':
description: The block number information
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: string
/eth_call:
post:
tags:
- General
summary: Eth_Call
operationId: call
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_call
id:
type: integer
default: 1
params:
type: array
items:
anyOf:
- type: object
properties:
to:
type: string
default: '0xC7846d1bc4d8bcF7c45a7c998b77cE9B3c904365'
data:
type: string
default: '0x1526fe270000000000000000000000000000000000000000000000000000000000000001'
- type: string
default: latest
default:
- to: '0xC7846d1bc4d8bcF7c45a7c998b77cE9B3c904365'
data: '0x1526fe270000000000000000000000000000000000000000000000000000000000000001'
- latest
responses:
'200':
description: The result of the call
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: string
/eth_callMany:
post:
tags:
- General
summary: eth_callMany
operationId: callMany
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_callMany
id:
type: integer
default: 1
params:
type: array
default:
- - transactions:
- from: '0xacD03D601e5bB1B275Bb94076fF46ED9D753435A'
to: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'
gas: '0xf4240'
gasPrice: '0x7896e72a'
data: '0xa9059cbb000000000000000000000000bc0E63965946815d105E7591407704e6e1964E590000000000000000000000000000000000000000000000000000000005f5e100'
- to: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'
gasPrice: '0x7896e72a'
data: '0x70a08231000000000000000000000000bc0E63965946815d105E7591407704e6e1964E59'
blockOverride:
blockNumber: '0x6eee101'
- blockNumber: '0x6eee101'
transactionIndex: 1
- {}
items:
type: object
responses:
'200':
description: The result of the multiple calls
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: array
items:
type: object
description: The results of the executed calls.
/eth_chainId:
post:
tags:
- General
summary: eth_chainId
operationId: chainId
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_chainId
id:
type: integer
default: 1
responses:
'200':
description: The current chain ID
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: string
/eth_createAccessList:
post:
tags:
- General
summary: eth_createAccessList
operationId: createAccessList
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_createAccessList
id:
type: integer
default: 1
params:
type: array
items:
anyOf:
- type: object
properties:
from:
type: string
default: '0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63'
data:
type: string
default: '0x608060806080608155'
- type: string
default: pending
default:
- from: '0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63'
data: '0x608060806080608155'
- pending
responses:
'200':
description: The generated access list and gas used
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: object
properties:
accessList:
type: array
items:
type: object
properties:
address:
type: string
storageKeys:
type: array
items:
type: string
gasUsed:
type: string
/eth_estimateGas:
post:
tags:
- General
summary: eth_estimateGas
operationId: estimateGas
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_estimateGas
id:
type: integer
default: 1
params:
type: array
items:
anyOf:
- type: object
properties:
from:
type: string
default: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
to:
type: string
default: '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'
- type: string
default: latest
default:
- from: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
to: '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'
- latest
responses:
'200':
description: The estimated gas required
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: string
/eth_feeHistory:
post:
tags:
- General
summary: eth_feeHistory
operationId: feeHistory
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_feeHistory
id:
type: integer
default: 1
params:
type: array
items:
anyOf:
- type: integer
- type: string
- type: array
items:
type: integer
- type: array
items:
type: string
default:
- 1024
- latest
- - 10
- 20
- 30
responses:
'200':
description: Historical gas fee data
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: object
properties:
oldestBlock:
type: string
baseFeePerGas:
type: array
items:
type: string
gasUsedRatio:
type: array
items:
type: number
reward:
type: array
items:
type: array
items:
type: string
/eth_gasPrice:
post:
tags:
- General
summary: eth_gasPrice
operationId: gasPrice
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_gasPrice
id:
type: integer
default: 1
responses:
'200':
description: The current gas price
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: string
/eth_getBalance:
post:
tags:
- General
summary: eth_getBalance
operationId: getBalance
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_getBalance
id:
type: integer
default: 1
params:
type: array
default:
- '0xF977814e90dA44bFA03b6295A0616a897441aceC'
- latest
items:
type: string
responses:
'200':
description: The balance of the account
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: string
/eth_getBlockByHash:
post:
tags:
- General
summary: eth_getBlockByHash
operationId: getBlockByHash
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_getBlockByHash
id:
type: integer
default: 1
params:
type: array
items:
anyOf:
- type: string
default: '0x7e4aea365093a183b0df5f003f26144ef04ec8a6e7f4910356590c5fc7b1671f'
- type: boolean
default: true
default:
- '0x7e4aea365093a183b0df5f003f26144ef04ec8a6e7f4910356590c5fc7b1671f'
- true
responses:
'200':
description: The block information by hash
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
id:
type: integer
result:
type: object
/eth_getBlockByNumber:
post:
tags:
- General
summary: eth_getBlockByNumber
operationId: getBlockByNumber
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
default: '2.0'
method:
type: string
default: eth_getBlockByNumber
id:
type: integer
default: 1
params:
type: array
items:
anyOf:
- type: string
default: '0x6ecf0b4'
- type: boolean
default: true
default:
- '0x6ecf0b4'
- true
responses:
'200':
description: The block information by number
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
# --- truncated at 32 KB (80 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/chainstack/refs/heads/main/openapi/chainstack-optimism-node-api-openapi.yml