Skip to main content
Base nodes implement the Ethereum JSON-RPC 2.0 specification. All HTTP methods accept POST requests to your RPC endpoint. WebSocket endpoints support the same methods plus real-time subscription methods.
For production use, connect through a node provider or run your own Base node. The public endpoints https://mainnet.base.org and https://sepolia.base.org are rate-limited and not suitable for production traffic.

Request & Response Format

All requests are HTTP POST with Content-Type: application/json. The body must be a JSON-RPC 2.0 request object:
FieldTypeDescription
jsonrpcstringAlways "2.0"
methodstringThe RPC method name
paramsarrayMethod parameters in order
idnumber | stringIdentifier echoed back in the response
Success response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x4b7"
}
Error response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "Invalid params"
  }
}

Error Codes

CodeNameDescription
-32700Parse errorInvalid JSON received by the server
-32600Invalid requestThe JSON sent is not a valid request object
-32601Method not foundThe method does not exist or is not available
-32602Invalid paramsInvalid method parameter(s)
-32603Internal errorInternal JSON-RPC error
-32000Server errorNode-specific error (see message for details)

Block Parameters

Methods that accept a block parameter support the following values:
ValueDescription
"latest"Most recently mined block (default when not specified)
"earliest"Genesis block (block 0)
"pending"Pending/preconfirmed state — use with Flashblocks endpoints
"safe"Latest block considered safe by the consensus layer
"finalized"Latest block considered finalized
"0x<n>"Specific block number in hexadecimal

Account & State Methods

MethodDescription
eth_blockNumberReturns the most recently mined block number
eth_getBalanceReturns the ETH balance of an address
eth_getTransactionCountReturns the transaction count (nonce) of an address
eth_getCodeReturns the bytecode at a contract address
eth_getStorageAtReturns a raw storage slot value at a contract address
eth_callExecutes a read-only contract call without broadcasting

Block Methods

MethodDescription
eth_getBlockByNumberReturns a block by its number
eth_getBlockByHashReturns a block by its hash
eth_getBlockReceiptsReturns all receipts for a block
eth_getBlockTransactionCountByNumberReturns the transaction count for a block by number
eth_getBlockTransactionCountByHashReturns the transaction count for a block by hash

Transaction Methods

MethodDescription
eth_getTransactionByHashReturns a transaction by its hash
eth_getTransactionByBlockHashAndIndexReturns a transaction by block hash and index
eth_getTransactionByBlockNumberAndIndexReturns a transaction by block number and index
eth_getTransactionReceiptReturns the receipt for a mined transaction
eth_sendRawTransactionSubmits a signed transaction to the network

Gas & Fee Methods

MethodDescription
eth_gasPriceReturns the current suggested gas price
eth_maxPriorityFeePerGasReturns the suggested EIP-1559 priority fee
eth_feeHistoryReturns historical base fees and priority fee percentiles
eth_estimateGasEstimates gas required for a transaction

Log Methods

MethodDescription
eth_getLogsReturns logs matching a filter

Chain & Network Methods

MethodDescription
eth_chainIdReturns the chain ID of the current network
eth_syncingReturns the node’s sync status
net_versionReturns the network ID
web3_clientVersionReturns the client software version string

Debug Methods

Debug methods require a node with debug APIs enabled. Availability and rate limits vary by node provider. These methods replay transactions and are computationally expensive — avoid calling them in hot paths.
MethodDescription
debug_traceTransactionReturns the full EVM execution trace for a transaction
debug_traceBlockByHashReturns execution traces for all transactions in a block by hash
debug_traceBlockByNumberReturns execution traces for all transactions in a block by number

WebSocket Methods

WebSocket methods are only available over WebSocket (WSS) connections. All HTTP methods are also available over WebSocket. Connect using your provider’s WSS endpoint and send JSON-RPC messages as UTF-8 text frames.
MethodDescription
eth_subscribeCreates a real-time subscription to on-chain events
eth_unsubscribeCancels an active subscription

Flashblocks Methods

These methods are exclusive to Flashblocks-aware endpoints (mainnet-preconf.base.org / sepolia-preconf.base.org). They provide access to preconfirmed block state and real-time Flashblock data streams — not available on standard Base endpoints. See Flashblocks for an overview of the Flashblocks system and how to connect.

Simulation & Status

MethodDescription
eth_simulateV1Simulates transaction bundles against preconfirmed Flashblock state
base_transactionStatusChecks whether a transaction is present in the node’s mempool

WebSocket Subscriptions

SubscriptionDescription
newFlashblockTransactionsStreams transactions as they are preconfirmed into Flashblocks
pendingLogsStreams logs matching a filter as they are preconfirmed
newFlashblocksStreams full block state updates for each new Flashblock