eth_feeHistory
PolygonC2Returns a window of base fees and requested priority-fee percentiles across recent blocks, for building EIP-1559 fee strategies.
Endpoint
POST https://api.1st-node.com/v1/polygon/rpcParameters
| Name | Type | Description |
|---|---|---|
| blockCount | QUANTITY | Number of blocks in the requested range. |
| newestBlock | QUANTITY | TAG | Highest block of the range. |
| percentiles | Array | Priority-fee percentiles to sample. |
Returns
Object — baseFeePerGas, gasUsedRatio and reward percentiles.
Request
curl https://api.1st-node.com/v1/polygon/rpc \
-H "Authorization: Bearer $ONE_KEY" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_feeHistory",
"params": ["0x5", "latest", [25, 50, 75]]
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_feeHistory",
"params": ["0x5", "latest", [25, 50, 75]]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": { "oldestBlock": "0x12d4e26", "baseFeePerGas": ["0x…"], "reward": [["0x…"]] }
}More chain methods on Polygon
充值、拿密钥、上线。
自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。
获取 API 密钥