以太坊 RPC API

以太坊 API 方法

区块链 RPC 提供每个项目每秒 100 次请求,以及每天 100 万次请求的配额。某些以太坊方法会消耗大量资源,因此会被计为多次请求。下表显示了每种方法在配额方面的消耗情况。例如,debug_traceBlockByHash 调用的系数为 50,这意味着每次调用计为 50 个请求。不支持 Beacon 节点 API。

请注意,以太坊主网由 Erigon 归档节点集群提供支持,而以太坊 Holesky 测试网由 Geth 完整节点集群提供支持。 方法支持情况类似,但存在差异,如表所示。此外,如果某个方法未在下方列出,则表示不受支持。我们会在未来的版本中添加对其他方法的支持。

方法调用 请求乘数 Mainnet Testnet
eth_blockNumber 1
eth_call 1
eth_chainId 1
eth_estimateGas 1
eth_feeHistory 1
eth_gasPrice 1
eth_getBalance 1
eth_getBlockByHash 1
eth_getBlockByNumber 1
eth_getBlockReceipts 1
eth_getBlockTransactionCountByHash 1
eth_getBlockTransactionCountByNumber 1
eth_getCode 10
eth_getLogs 50
eth_getProof 50
eth_getStorageAt 1
eth_getTransactionByBlockHashAndIndex 1
eth_getTransactionByBlockNumberAndIndex 1
eth_getTransactionByHash 1
eth_getTransactionCount 1
eth_getTransactionReceipt 1
eth_getUncleByBlockHashAndIndex 1
eth_getUncleByBlockNumberAndIndex 1
eth_getUncleCountByBlockHash 1
eth_getUncleCountByBlockNumber 1
eth_maxPriorityFeePerGas 1
eth_subscribe 1
eth_syncing 1
eth_unsubscribe 1
eth_sendRawTransaction 1
net_listening 1
net_peerCount 1
net_version 1
txpool_inspect 50
txpool_status 50
web3_clientVersion 1
web3_sha3 1
trace_block 50
trace_call 50
trace_replayBlockTransactions 100
trace_replayTransaction 100
trace_transaction 50
debug_getBadBlocks 50
debug_storageRangeAt 50
debug_traceBlock 50
debug_traceBlockByHash 50
debug_traceBlockByNumber 50
debug_traceCall 50
debug_traceTransaction 50