Polygon
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Polygon
Free tier covers personal projects. Pay-as-you-go scales without a card.
This page is the complete catalog of every Polygon PoS JSON-RPC method TheRPC serves through https://polygon.therpc.io/YOUR_API_KEY, grouped by namespace so you can scan for the exact call you need. Each entry names the method, its purpose, and how it fits into a typical Polygon workflow — from reading MATIC balances and block heights to tracing a DeFi swap on QuickSwap or Aave. Click any method name to open its full reference page, complete with parameters, return shapes, Compute Unit cost, and ready-to-run code examples tuned for Polygon's ~2-second blocks and chain ID 137.
The eth_ namespace is the workhorse of any Polygon integration. These methods cover the core protocol surface: reading the latest block produced by Bor, checking MATIC and ERC-20 balances, submitting and tracking transactions, estimating gas for Polygon's famously low fees, and calling view functions on the contracts that power the network — QuickSwap, Aave, Polymarket, and the heavy USDT/USDC stablecoin flows that dominate Polygon activity.
eth_blockNumberGet the latest Polygon PoS block height with eth_blockNumber. Cheap liveness probe over the polygon.therpc.io JSON-RPC endpoint, chain ID 137.
eth_callRun read-only contract calls on Polygon PoS with eth_call — query ERC-20s like USDT or DEX pools with no MATIC spent. polygon.therpc.io, chain ID 137.
eth_chainIdUse eth_chainId to confirm the endpoint serves Polygon PoS mainnet — returns 0x89 (137). Replay-safe network check over polygon.therpc.io.
eth_estimateGasEstimate the gas a Polygon PoS transaction needs before signing with eth_estimateGas. Set MATIC gas limits accurately via polygon.therpc.io, chain ID 137.
eth_feeHistoryPull recent Polygon PoS base fees, gas-used ratios, and priority-fee percentiles with eth_feeHistory to build MATIC fee estimators. polygon.therpc.io, chain 137.
eth_gasPriceGet Polygon PoS's suggested gas price in wei with eth_gasPrice — a quick MATIC fee read over polygon.therpc.io, chain ID 137.
eth_getBalanceGet an account's MATIC balance at any block on Polygon PoS with eth_getBalance. Query polygon.therpc.io, chain ID 137, returns wei as hex.
eth_getBlockByHashFetch full Polygon PoS block data by its hash with eth_getBlockByHash. Headers, transactions, and gas metrics over polygon.therpc.io, chain ID 137.
eth_getBlockByNumberFetch a Polygon PoS block by height or tag (latest, finalized) with eth_getBlockByNumber. Walk the chain or read the head via polygon.therpc.io, chain 137.
eth_getBlockReceiptsGet every transaction receipt in a Polygon PoS block in one eth_getBlockReceipts call. Ingest logs and gas data fast via polygon.therpc.io, chain ID 137.
eth_getBlockTransactionCountByHashCount the transactions in a Polygon PoS block by its hash with eth_getBlockTransactionCountByHash — a light block-fullness read via polygon.therpc.io, chain 137.
eth_getBlockTransactionCountByNumberCount transactions in a Polygon PoS block by height or tag with eth_getBlockTransactionCountByNumber over the MATIC JSON-RPC endpoint.
eth_getCodeFetch the deployed bytecode at any Polygon PoS address and block with eth_getCode over the MATIC JSON-RPC endpoint to tell contracts from EOAs.
eth_getFilterChangesPoll a Polygon PoS filter for new logs, blocks, or pending txs since the last call with eth_getFilterChanges over the MATIC JSON-RPC endpoint.
eth_getFilterLogsReturn every log matching a Polygon PoS log filter regardless of poll state with eth_getFilterLogs over the MATIC JSON-RPC endpoint.
eth_getLogsQuery Polygon PoS event logs by address, topics, and block range with eth_getLogs over the MATIC JSON-RPC endpoint — the core method for backfill indexing.
eth_getProofGet Merkle-Patricia proofs for a Polygon PoS account and its storage slots with eth_getProof over the MATIC JSON-RPC endpoint for trustless verification.
eth_getStorageAtRead the 32-byte value at a Polygon PoS contract storage slot with eth_getStorageAt over the MATIC JSON-RPC endpoint, no ABI required.
eth_getTransactionByBlockHashAndIndexFetch a Polygon PoS transaction by its block hash and position with eth_getTransactionByBlockHashAndIndex over the MATIC JSON-RPC endpoint.
eth_getTransactionByBlockNumberAndIndexFetch a Polygon PoS transaction by block number or tag and index with eth_getTransactionByBlockNumberAndIndex over the MATIC JSON-RPC endpoint.
eth_getTransactionByHashFetch a Polygon PoS transaction object by its hash with eth_getTransactionByHash over the MATIC JSON-RPC endpoint to check mining status and decode input.
eth_getTransactionCountGet the nonce of a Polygon PoS address at any block with eth_getTransactionCount over the MATIC JSON-RPC endpoint to build and sequence transactions.
eth_getTransactionReceiptFetch a mined Polygon transaction receipt with eth_getTransactionReceipt: status, gas used, effective gas price, and emitted MATIC logs.
eth_getUncleByBlockHashAndIndexeth_getUncleByBlockHashAndIndex on Polygon returns an uncle header by block hash and index; Polygon PoS has no uncles, so it returns null.
eth_getUncleByBlockNumberAndIndexeth_getUncleByBlockNumberAndIndex on Polygon returns an uncle header by block height and index; Polygon PoS has no uncles, so it returns null.
eth_getUncleCountByBlockHasheth_getUncleCountByBlockHash on Polygon counts uncles in a block by hash; Polygon PoS produces no uncles, so it always returns 0x0.
eth_getUncleCountByBlockNumbereth_getUncleCountByBlockNumber on Polygon counts uncles at a block height or tag; Polygon PoS has no uncles, so it always returns 0x0.
eth_maxPriorityFeePerGaseth_maxPriorityFeePerGas on Polygon returns the node's suggested priority fee (tip) in wei for EIP-1559 MATIC transactions.
eth_newBlockFiltereth_newBlockFilter on Polygon creates a server-side filter for new block hashes, returning an ID to poll with eth_getFilterChanges.
eth_newFiltereth_newFilter on Polygon creates a server-side log filter and returns an ID for incremental event polling with eth_getFilterChanges.
eth_newPendingTransactionFiltereth_newPendingTransactionFilter on Polygon creates a mempool filter for pending tx hashes, returning an ID to poll with eth_getFilterChanges.
eth_sendRawTransactioneth_sendRawTransaction on Polygon broadcasts a fully signed, RLP-encoded MATIC transaction to the mempool and returns its hash.
eth_subscribeCall eth_subscribe on Polygon (chain 137) to open a WebSocket subscription for new heads, logs, or pending txs with no polling.
eth_syncingCall eth_syncing on Polygon (chain 137) to read a node's sync progress, or false when the Bor node is fully caught up.
eth_uninstallFilterCall eth_uninstallFilter on Polygon (chain 137) to remove a server-side log, block, or pending-tx filter and free node resources.
eth_unsubscribeCall eth_unsubscribe on Polygon (chain 137) to cancel an active WebSocket subscription by ID and stop further notifications.
The debug_ namespace gives you a deep, low-level view into how transactions execute on Polygon. Use these methods to replay a transaction step by step, inspect raw block and state data, and pinpoint exactly where a contract call reverted. They are indispensable when you are auditing a failed swap, reconstructing historical state on Polygon's high-throughput chain, or building analytics over the millions of daily transactions that Bor processes.
debug_getBadBlocksCall debug_getBadBlocks on Polygon (chain ID 137) to list invalid blocks the Bor node has seen and rejected since its last restart.
debug_storageRangeAtUse debug_storageRangeAt on Polygon (chain ID 137) to page through a contract's raw storage slots at the state after a given transaction in a block.
debug_traceBlockCall debug_traceBlock on Polygon (chain ID 137) to replay an RLP-encoded block and get opcode-level Bor traces for each transaction.
debug_traceBlockByHashCall debug_traceBlockByHash on Polygon (chain ID 137) to get opcode-level Bor execution traces for every transaction in a block by its hash.
debug_traceBlockByNumberCall debug_traceBlockByNumber on Polygon (chain ID 137) for opcode-level Bor traces of every transaction in a block by number or tag.
debug_traceCallCall debug_traceCall on Polygon (chain ID 137) to simulate a call against any block state and get a full opcode-level Bor trace, no transaction sent.
debug_traceTransactionCall debug_traceTransaction on Polygon (chain ID 137) to replay a transaction at opcode level and reproduce the exact Bor EVM state where it was mined.
The trace_ namespace returns the full internal call tree for any Polygon transaction or block, exposing every nested contract call, value transfer, and state change that a single top-level transaction triggers. On a DeFi-heavy chain like Polygon — where one Aave interaction or QuickSwap route can fan out into dozens of internal calls — these traces are essential for accounting, MEV research, security review, and reconstructing token movements that never appear as standalone transactions.
trace_blockCall trace_block on Polygon (chain ID 137) to get call-tree traces for every transaction in a block, selected by number or tag.
trace_callCall trace_call on Polygon (chain ID 137) to simulate a call against a block state and return a call tree, optional VM trace, and state diff.
trace_filterCall trace_filter on Polygon (chain ID 137) to search traces by address and block range across many blocks, with pagination.
trace_replayBlockTransactionsCall trace_replayBlockTransactions on Polygon (chain ID 137) to replay a whole block and get call tree, VM trace, and state diff per transaction.
trace_replayTransactionCall trace_replayTransaction on Polygon (chain ID 137) to replay a transaction and return a call tree, opcode-level VM trace, and state diff.
trace_transactionCall trace_transaction on Polygon (chain ID 137) for the call tree of a transaction — every internal call, create, and self-destruct.
The net_ namespace exposes network-level status and connection details. These lightweight calls confirm you are talking to Polygon PoS mainnet (network ID 137), report whether the node is actively peering, and surface basic connectivity health — a quick sanity check to run before firing off heavier reads or writes against the endpoint.
net_listeningCall net_listening on Polygon (chain 137) to check whether the node is actively listening for incoming peer-to-peer connections.
net_peerCountCall net_peerCount on Polygon (chain 137) to get the number of P2P peers connected to the node as a hex-encoded integer.
net_versionCall net_version on Polygon (chain 137) to return the network ID as a decimal string and confirm the node is on Polygon mainnet.
The txpool_ namespace lets you inspect the pending and queued transactions waiting to be included in an upcoming Bor block. Because Polygon produces blocks roughly every 2 seconds, the mempool turns over quickly — these methods are valuable for watching for incoming transfers, monitoring stuck or replaced transactions, and understanding fee dynamics during periods of heavy stablecoin and DeFi activity.
txpool_inspectCall txpool_inspect on Polygon (chain 137) for a human-readable summary of pending and queued transactions by sender and nonce.
txpool_statusCall txpool_status on Polygon (chain 137) to get the count of pending and queued mempool transactions as hex-encoded integers.
The web3_ namespace bundles small utility helpers for general interaction with the Polygon endpoint. These methods report the client version behind TheRPC and compute Keccak-256 hashes — handy building blocks when you are deriving function selectors, hashing data for contract calls, or simply confirming which node software is serving your Polygon requests.