Polygon Core API Methods

Index of Ethereum core API Methods

πŸ‘

Welcome to the Polygon Core API Methods documentation.

This page provides an overview of the available API methods for interacting with the Polygon blockchain.

Index of API Methods by Namespace

bor Namespace

bor_getAuthor
bor_getCurrentProposer
bor_getCurrentValidators
bor_getRootHash
bor_getSnapshot
bor_getSignersAtHash
bor_getSnapshotProposer
bor_getSnapshotAtHash
bor_getSigners

eth Namespace

eth_accounts-polygon
eth_blockNumber-polygon
eth_call-polygon
eth_chainId-polygon
eth_createAccessList-polygon
eth_estimateGas-polygon
eth_feeHistory-polygon
eth_gasPrice-polygon
eth_getBalance-polygon
eth_getBlockByHash-polygon
eth_getBlockByNumber-polygon
eth_getBlockReceipts-polygon
eth_getBlockTransactionCountByHash-polygon
eth_getBlockTransactionCountByNumber-polygon
eth_getCode-polygon
eth_getFilterChanges-polygon
eth_getFilterLogs-polygon
eth_getLogs-polygon
eth_getProof-polygon
eth_getroothash-polygon
eth_getStorageAt-polygon
eth_getTransactionByBlockHashAndIndex-polygon
eth_getTransactionByBlockNumberAndIndex-polygon
eth_getTransactionByHash-polygon
eth_getTransactionCount-polygon
eth_getTransactionReceipt-polygon
eth_maxPriorityFeePerGas-polygon
eth_newBlockFilter-polygon
eth_newFilter-polygon
eth_newPendingTransactionFilter-polygon
eth_sendRawTransaction-polygon
eth_sendTransaction-polygon
eth_signTransaction-polygon
eth_syncing-polygon
eth_uninstallFilter-polygon
[Websocket] eth_subscribe-polygon
[Websocket]eth_unsubscribe-polygon

net Namespace

net_listening-polygon
net_peerCount-polygon
net_version-polygon

txpool Namespace

txpool_content-polygon
txpool_inspect-polygon
txpool_status-polygon

debug Namespace

debug_getBadBlocks-polygon
debug_getRawBlock-polygon
debug_getRawHeader-polygon
debug_storageRangeAt-polygon
debug_traceBlock-polygon
debug_traceBlockByHash-polygon
debug_traceBlockByNumber-polygon
debug_traceCall-polygon
debug_traceTransaction-polygon

trace Namespace

Erigon, OpenEthereum only

trace_block-polygon
trace_call-polygon
trace_callMany-polygon
trace_filter-polygon
trace_get-polygon
trace_replayBlockTransactions-polygon
trace_replayTransaction-polygon
trace_transaction-polygon

web3 Namespace

web3_clientVersion-polygon

erigon Namespace (TBD)

Erigon only

erigon_forks
erigon_getHeaderbyHash
erigon_getHeaderByNumber
erigon_getLogsByHash
erigon_issuance


Index of API Methods by Use Cases

Getting Block

Retrieves information from a particular block in the blockchain.

bor_getCurrentProposer
bor_getSignersAtHash
eth_getBlockByHash
eth_blocknumber
eth_getBlockByNumber
eth_getBlockReceipts
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByNumber

Reading Transactions

Retrieves information on the state data for addresses regardless of whether it is a user or a smart contract.

eth_getTransactionByHash-polygon
eth_getTransactionByBlockHashAndIndex-polygon
eth_getTransactionByBlockNumberAndIndex-polygon
eth_getTransactionReceipt-polygon
eth_getTransactionCount-polygon

Writing Transactions & EVM Execution

Allows developers to send ETH from one address to another, write data on-chain, and interact with smart contracts.

eth_call-polygon
eth_sendRawTransaction-polygon
eth_sendTransaction-polygon(Not Supported)
eth_signTransaction-polygon(Not Supported)

Account Information

Returns information regarding an address's stored on-chain data.

eth_getCode-polygon
eth_getBalance-polygon
eth_accounts-polygon
eth_getStorageAt-polygon
eth_getProof-polygon

Event Logs

Returns logs which are records that denote/provide context on specific events within a smart contract, like a token transfer or a change of ownership, for example.

eth_getLogs-polygon
eth_newFilter-polygon
eth_newPendingTransactionFilter-polygon
eth_newBlockFilter-polygon
eth_getFilterChanges-polygon
eth_getFilterLogs-polygon
eth_uninstallFilter-polygon

Chain Information

Returns information on the Ethereum network and internal settings.

eth_chainId-polygon
net_version-polygon
bor_getAuthor-polygon
bor_getCurrentValidators-polygon
bor_getRootHash-polygon

Gas Estimation

Returns information on the Ethereum network gas estimates.

eth_estimateGas-polygon
eth_gasPrice-polygon
eth_feeHistory-polygon
eth_maxPriorityFeePerGas-polygon
eth_createAccessList-polygon

Real-time Events

Introduces WebSocket-based requests/responses which leverage a network connection allowing developers to listen for changes continuously without the need for HTTP polling.

[WSS] eth_subscribe-polygon
[WSS] eth_unsubscribe-polygon

Debug & Trace

Returns detailed information and data related to transactions, including opcode traces, stack and memory values, and gas usage.

debug_getBadBlocks-polygon
debug_getRawBlock-polygon
debug_getRawHeader-polygon
debug_storageRangeAt-polygon
debug_traceBlockByHash-polygon
debug_traceBlockByNumber-polygon
debug_traceCall-polygon
debug_traceTransaction-polygon

trace_block
trace_call
trace_callMany
trace_filter
trace_get
trace_replayBlockTransactions
trace_replayTransaction
trace_transaction

Transaction Pool (Geth Only)

Returns information about the transaction pool, which contains pending transactions yet to be included in a block.

txpool_content-polygon
txpool_inspect-polygon
txpool_status-polygon

Node Status

Returns information about current node status.

eth_syncing-polygon
net_listening-polygon
net_peerCount-polygon
web3_clientVersion-polygon


Deprecated

API methods that are no more used

eth_getUncleByBlockHashAndIndex-polygon
eth_getUncleByBlockNumberAndIndex-polygon
eth_getUncleCountByBlockHash-polygon
eth_getUncleCountByBlockNumber-polygon
trace_rawTransaction-polygon