theRPC
All chains

Documentation

Base methods

Read-only methods supported on the Base endpoint. Click a method to see params + a runnable code sample.

Getting started

Ethereum API Methods

Complete reference of all supported Ethereum JSON-RPC API methods including core, debug, trace, and web3 endpoints. Each method includes documentation links, multiplier cost and network support information.

API Overview

Comprehensive technical overview of TheRPC API architecture, including JSON-RPC 2.0 specification, request formats, authentication, response structures, and error handling

Authentication Guide

Complete guide to securing your Ethereum API requests using API keys, including implementation examples, best practices, and security recommendations

Basic Ethereum Operations

Comprehensive guide to common Ethereum blockchain operations using TheRPC API, including balance retrieval, transaction operations, block information, contract interactions, and gas management

FAQ

Comprehensive guide answering common questions about TheRPC Ethereum API usage, including authentication, rate limits, error handling, performance optimization, and best implementation practices

TheRPC API Documentation

Comprehensive documentation for TheRPC API - access Ethereum and other blockchain networks through a unified JSON-RPC interface with detailed guides, API references, and implementation examples

Quick Start Guide

Comprehensive guide to getting started with TheRPC blockchain API. Learn how to quickly integrate our API into your project with step-by-step instructions and code examples for multiple programming languages.

Rate Limits & Quotas

Comprehensive guide to TheRPC API rate limits, quotas, implementation strategies for optimal API usage, including error handling, caching, batching, and best practices for high-throughput applications

Core API

eth_chainId

Returns the EIP-155 chain ID of the network the endpoint is serving. Use it to confirm a wallet is connected to the chain you expect.

eth_blockNumber

Returns the height of the most recent block. The simplest possible health check for an EVM endpoint.

eth_getBlockByNumber

Returns the full block (header + transactions) for a given block number or tag. The canonical "give me block N" call.

eth_getBalance

Returns the native-token balance of an account at the requested block. The canonical "how much ETH does this address hold?" call.

eth_gasPrice

Returns the node's suggested legacy gas price in wei. On EIP-1559 chains, prefer eth_feeHistory or eth_maxPriorityFeePerGas.

eth_call

Execute a message call against the EVM without writing to the chain. The workhorse method for reading contract state.

eth_getLogs

Retrieve event logs matching a filter. The right call for indexers, analytics, and any backfill that doesn't need real-time subscriptions.

eth_sendRawTransaction

Broadcast a signed transaction to the network. The only way to write to an EVM chain through a stateless RPC.

eth_estimateGas

Learn how to use the eth_estimateGas method to calculate the estimated gas required for Ethereum transactions. Includes parameters, examples, and best practices.

eth_feeHistory

Learn how to use the eth_feeHistory method to retrieve historical gas fee information from the Ethereum blockchain. Includes examples of fee analysis and percentile calculations.

eth_getBlockByHash

Learn how to use the eth_getBlockByHash method to fetch detailed information about Ethereum blocks using their hash. Includes transaction details and block properties.

eth_getBlockReceipts

Learn how to use the eth_getBlockReceipts method to retrieve complete transaction receipt data for an entire Ethereum block. Includes field documentation and usage examples.

eth_getBlockTransactionCountByHash

Learn how to use the eth_getBlockTransactionCountByHash method to retrieve the number of transactions in an Ethereum block identified by its hash.

eth_getBlockTransactionCountByNumber

Learn how to use the eth_getBlockTransactionCountByNumber method to retrieve the number of transactions in an Ethereum block identified by its number.

eth_getCode

Learn how to use the eth_getCode method to retrieve compiled bytecode from Ethereum smart contracts. Includes examples for bytecode verification and analysis.

eth_getFilterChanges

Learn how to efficiently poll for new blockchain events using eth_getFilterChanges - essential for monitoring smart contract activity, token transfers, and blockchain state changes.

eth_getFilterLogs

Learn how to use eth_getFilterLogs to fetch all historical logs matching a filter's criteria in one request - essential for event analysis and initial data loading in dApps.

eth_getProof

Learn how to use the eth_getProof method to retrieve cryptographic proofs for account and storage data on the Ethereum blockchain. Includes verification examples.

eth_getStorageAt

Learn how to use the eth_getStorageAt method to access raw storage data from Ethereum smart contracts. Includes storage layout explanations and practical examples.

eth_getTransactionByBlockHashAndIndex

Learn how to use the eth_getTransactionByBlockHashAndIndex method to get transaction information using a block hash and transaction index position.

eth_getTransactionByBlockNumberAndIndex

Learn how to use the eth_getTransactionByBlockNumberAndIndex method to fetch transaction details using a block number and index position in the Ethereum blockchain.

eth_getTransactionByHash

Learn how to use the eth_getTransactionByHash method to fetch detailed transaction information using a transaction hash. Includes examples for various transaction types.

eth_getTransactionCount

Learn how to use the eth_getTransactionCount method to retrieve the number of transactions sent from an Ethereum address, also known as the nonce.

eth_getTransactionReceipt

Learn how to use the eth_getTransactionReceipt method to fetch transaction execution results, including status, gas used, logs, and contract deployment information.

eth_getUncleByBlockHashAndIndex

Learn how to use the eth_getUncleByBlockHashAndIndex method to fetch uncle (ommer) block information using a block hash and uncle index.

eth_getUncleByBlockNumberAndIndex

Learn how to use the eth_getUncleByBlockNumberAndIndex method to fetch uncle (ommer) block information using a block number and uncle index.

eth_getUncleCountByBlockHash

Learn how to use the eth_getUncleCountByBlockHash method to retrieve the number of uncle blocks in a specified block on the Ethereum blockchain.

eth_getUncleCountByBlockNumber

Learn how to use the eth_getUncleCountByBlockNumber method to retrieve the number of uncle blocks in a specified block height on the Ethereum blockchain.

eth_maxPriorityFeePerGas

Learn how to use the eth_maxPriorityFeePerGas method to retrieve the current recommended priority fee (tip) needed for transaction inclusion on the Ethereum network.

eth_newBlockFilter

Learn how to use eth_newBlockFilter to monitor new blocks on the Ethereum blockchain - essential for tracking transaction confirmations, syncing applications, and building real-time blockchain explorers.

eth_newFilter

Learn how to use eth_newFilter to create filters for Ethereum event logs - the key to monitoring smart contract events, tracking token transfers, and building real-time blockchain applications.

eth_newPendingTransactionFilter

Learn how to use eth_newPendingTransactionFilter to monitor the Ethereum mempool in real-time - essential for transaction tracking, gas price optimization, and market analysis.

eth_subscribe

Learn how to use the eth_subscribe method to receive real-time notifications about blockchain events including new blocks, pending transactions, logs, and synchronization status via WebSocket connections.

eth_syncing

Learn how to use eth_syncing to check if your Ethereum node is currently synchronizing with the blockchain network, track sync progress, and understand different synchronization states.

eth_uninstallFilter

Learn how to use eth_uninstallFilter to clean up unused filters in Ethereum - avoid resource leaks and optimize node performance by properly removing filters that are no longer needed.

eth_unsubscribe

Learn how to use the eth_unsubscribe method to cancel WebSocket-based subscriptions to Ethereum blockchain events and efficiently manage connection resources.

net_listening

Learn how to use the net_listening method to check whether your Ethereum node is actively listening for network connections and troubleshoot connectivity issues.

net_peerCount

Learn how to use the net_peerCount method to check how many peers are connected to your Ethereum node, monitor network health, and diagnose connectivity issues.

net_version

Learn how to use the net_version method to identify which Ethereum network your client is connected to, including mainnet, testnets, and other EVM-compatible networks.

Ethereum Core Methods

Comprehensive documentation for Ethereum core API methods including eth_, net_, txpool_, and web3_ endpoints with detailed examples, parameters, and return values

txpool_inspect

Learn how to use the txpool_inspect method to get a human-readable overview of pending and queued transactions in your Ethereum node's mempool for monitoring and diagnostics.

txpool_status

Learn how to use the txpool_status method to monitor pending and queued transactions in your Ethereum node's mempool, check network congestion, and optimize gas price strategies.

web3_clientVersion

Learn how to use the web3_clientVersion method to identify which Ethereum client software and version your node is running, useful for debugging and compatibility checks.

web3_sha3

Learn how to use the web3_sha3 method to generate Keccak-256 hashes for various Ethereum operations including function signatures, event topics, and blockchain data verification.

Trace API

Debug API

debug_getBadBlocks

Learn how to use the debug_getBadBlocks method to retrieve, analyze, and understand invalid blocks detected by your Ethereum node, essential for network operators and investigators of consensus issues.

debug_storageRangeAt

Learn how to use the debug_storageRangeAt method to inspect and retrieve contract storage data within a specified range for comprehensive smart contract debugging, state analysis, and contract auditing on Ethereum.

debug_traceBlock

Learn how to use the debug_traceBlock method to obtain comprehensive trace information for all transactions in an Ethereum block, providing deep visibility into opcode execution for advanced debugging and analysis.

debug_traceBlockByHash

Learn how to use the debug_traceBlockByHash method to retrieve detailed opcode-level execution traces for all transactions in a specific Ethereum block identified by its hash, essential for debugging and analyzing complex blockchain behavior.

debug_traceBlockByNumber

Learn how to use the debug_traceBlockByNumber method to obtain a full trace of all invoked opcodes of all transactions included in a specific Ethereum block identified by its number.

debug_traceCall

Learn how to use the debug_traceCall method to simulate and trace contract calls with opcode-level details, allowing deep inspection of EVM execution for debugging and analysis without affecting the blockchain.

debug_traceTransaction

Learn how to use the debug_traceTransaction method to get opcode-level execution details for any historical transaction, with exact reproduction of the original blockchain state for accurate debugging and analysis.

Tools

C# Tools for Ethereum Development

Complete guide to C# libraries for Ethereum blockchain development, including Nethereum framework, .NET integration, smart contract interaction, and Unity3D examples

Curl Examples for Ethereum API Integration

Comprehensive guide to interacting with Ethereum blockchain using Curl commands and HTTP requests, including authentication, request formatting, and common API operations

Dart & Flutter Tools for Ethereum Development

Complete guide to using Dart and Flutter for Ethereum blockchain development with Web3Dart library, code examples, and mobile integration patterns for dApps

Go Tools for Ethereum Blockchain Development

Comprehensive guide to Go tools for Ethereum development, including the official Go-Ethereum (geth) implementation, smart contract integration, and production-ready code examples

Java & Kotlin Tools for Ethereum Development

Comprehensive guide to Web3j library for Java and Kotlin Ethereum development with code examples, smart contract integration, and Android implementation patterns

JavaScript & TypeScript Tools for Ethereum

Comprehensive guide to JavaScript and TypeScript libraries for Ethereum blockchain development, including Web3.js and Ethers.js with practical code examples and integration patterns

PHP Tools for Ethereum Development

Comprehensive guide to PHP libraries for Ethereum blockchain development, including Web3.php framework, Laravel integration, smart contract interaction, and production examples

Python Tools for Ethereum Blockchain Development

Comprehensive guide to Python libraries for Ethereum development including Web3.py and Eth-brownie, with detailed code examples, smart contract integration, and asynchronous patterns

Rust Tools for Ethereum Blockchain Development

Comprehensive guide to Rust libraries for Ethereum development, including Web3-rs, smart contract integration, async patterns, and performance optimization techniques

Swift Tools for Ethereum Blockchain Development

Comprehensive guide to Swift libraries for Ethereum development, including Web3.swift, iOS and macOS integration examples, SwiftUI patterns, and native wallet management

Guides

Ethereum Development Best Practices

Comprehensive guide on best practices for working with Ethereum blocks, including performance optimization, error handling, security considerations, and reliable block processing implementations.

Block Management Best Practices

Comprehensive guide on best practices for handling Ethereum blocks, including robust error handling, performance optimization, security considerations, and production implementation examples.

Block Confirmations Guide

Comprehensive guide to understanding Ethereum block confirmations, implementing secure transaction verification, and ensuring transaction finality across different network conditions.

Block Gas Management Guide

Comprehensive guide to effectively managing gas usage at the block level, optimizing transaction costs, implementing EIP-1559 fee strategies, and developing gas-efficient applications.

Block Timestamps Guide

Comprehensive guide to Ethereum block timestamps, including accuracy considerations, implementing time-based operations, and developing secure time-dependent smart contracts and applications.

Chain Reorganization Guide

Comprehensive guide to detecting, handling, and mitigating Ethereum blockchain reorganizations (reorgs), including implementation strategies, common ancestor detection, and transaction resubmission.

Syncing Strategies Guide

Comprehensive guide to Ethereum node synchronization methods, including full sync, fast sync, snap sync, and light clients, with implementation examples and performance considerations.

Uncle Blocks Guide

Comprehensive guide to Ethereum uncle blocks (ommers), including their purpose in network security, reward structure, retrieval methods, and impact on mining economics.

Working with Blocks

Comprehensive guide to effectively working with Ethereum blocks, including block structure, retrieval methods, monitoring techniques, confirmation handling, and best implementation practices.