Thanks to visit codestin.com
Credit goes to docs.base.org

Skip to main content
Base exposes a single, fully EVM-compatible JSON-RPC API across two performance tiers. You can move from 2-second block confirmations to 200ms pre-confirmations by switching one URL and one block tag.

Networks

For network details, RPC endpoints, and wallet setup, see Connecting to Base.
The public Base endpoints are HTTP only. WebSocket RPC connections (eth_subscribe, newHeads, logs) are not available on public Base endpoints — use a node provider such as Alchemy or QuickNode for WebSocket support.

Flashblocks

All Base public endpoints are Flashblocks-enabled. Every standard eth_ method works identically, and the pending block tag reflects the current pre-confirmed block in progress, updated every ~200ms with new batches of sequencer-ordered transactions. Calls like eth_getBalance, eth_getStorageAt, and eth_call run against real sequencer state up to 1.8 seconds before the block seals, with sub-second latency.

API Reference

Ethereum JSON-RPC API

Core Ethereum protocol methods for account queries, block and transaction data, gas estimation, and log filtering.
Methods marked ✓ support the "pending" block tag, which reflects the current pre-confirmed Flashblock in progress.
MethodDescriptionFlashblocks pending
eth_blockNumberCurrent block number
eth_getBalanceAccount ETH balance
eth_getTransactionCountAccount nonce / tx count
eth_getCodeDeployed contract bytecode
eth_getStorageAtContract storage slot value
eth_callExecute read-only call
eth_getBlockByNumberBlock data by number
eth_getBlockByHashBlock data by hash
eth_getBlockReceiptsAll receipts for a block
eth_getBlockTransactionCountByNumberTx count by block number
eth_getBlockTransactionCountByHashTx count by block hash
eth_getTransactionByHashTransaction data by hash
eth_getTransactionByBlockHashAndIndexTx by block hash and index
eth_getTransactionByBlockNumberAndIndexTx by block number and index
eth_getTransactionReceiptReceipt for a mined tx
eth_sendRawTransactionSubmit signed transaction
eth_gasPriceCurrent gas price
eth_maxPriorityFeePerGasMax priority fee estimate
eth_feeHistoryHistorical base fee and rewards
eth_estimateGasEstimate gas for a tx
eth_getLogsQuery event logs by filter
eth_chainIdNetwork chain ID
eth_syncingNode sync status
net_versionNetwork version ID
web3_clientVersionClient version string
eth_subscribeSubscribe to events (WSS)
eth_unsubscribeCancel a subscription (WSS)

Flashblocks API

Pre-confirmation methods for sub-second transaction signals on Base. These methods enable reading state, simulating bundles, and streaming events up to ~1.8 seconds before a block seals.
MethodDescription
eth_simulateV1Simulate transaction bundles against pre-confirmed state
base_transactionStatusCheck if a transaction has been received by the mempool
newFlashblockTransactionsSubscribe to individual pre-confirmed transactions
pendingLogsSubscribe to filtered logs from pre-confirmed transactions
newFlashblocksSubscribe to full Flashblock payload stream

Debug API

Development and debugging utilities for deep transaction inspection and block replay. Debug methods replay transactions and are computationally expensive — availability and rate limits vary by node provider.
MethodDescription
debug_traceTransactionFull EVM execution trace for a transaction
debug_traceBlockByHashEVM traces for all transactions in a block by hash
debug_traceBlockByNumberEVM traces for all transactions in a block by number

Request & Response Format

All requests are HTTP POST with Content-Type: application/json.
FieldTypeDescription
jsonrpcstringAlways "2.0"
methodstringThe RPC method name
paramsarrayMethod parameters in order
idnumber | stringIdentifier echoed back in the response
Request:
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0x742d35Cc6634C0532925a3b8D4C9dD0b4f3BaEa", "pending"],
  "id": 1
}
Success response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1a055690d9db80000"
}
Error response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "Invalid params"
  }
}

Error Codes

CodeNameDescription
-32700Parse errorInvalid JSON
-32600Invalid requestNot a valid JSON-RPC 2.0 object
-32601Method not foundMethod does not exist or is unavailable
-32602Invalid paramsInvalid method parameters
-32603Internal errorInternal JSON-RPC error
-32000Server errorNode-specific error (see message)

Block Parameters

ValueStandardFlashblocks
"latest"Most recently sealed blockMost recently sealed block
"pending"Unmined transaction pool stateCurrent Flashblock in progress (~200ms resolution)
"safe"Latest safe blockLatest safe block
"finalized"Latest finalized blockLatest finalized block
"earliest"Genesis blockGenesis block
"0x<n>"Specific block by numberSpecific block by number