Skip to main content
Docs

API Reference: Common Methods & Error Handling

Common methods

A representative sample of frequently used EVM JSON-RPC methods:

MethodPurpose
eth_blockNumberLatest block number
eth_getBalanceAccount balance at a given block
eth_gasPriceCurrent gas price estimate
eth_getBlockByNumberFull block data by number
eth_callRead-only contract call, no state change

Example request/response for eth_getBlockByNumber:

// Request
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["0x1284d2f", false],
  "id": 1
}
// Response (abbreviated)
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x1284d2f",
    "hash": "0x...",
    "timestamp": "0x656789ab",
    "transactions": ["0x...", "0x..."]
  }
}

Error handling

Errors follow the standard JSON-RPC 2.0 error object shape: a code, a message, and sometimes a data field with more detail.

CodeMeaning
-32700Parse error. Invalid JSON was sent.
-32600Invalid request. The JSON sent is not a valid request object.
-32601Method not found
-32602Invalid params
-32603Internal error
429 (HTTP)Rate limit exceeded for your current tier

Handle a 429 explicitly in production code. See Rate Limits by Tier for the ceilings themselves.