Avalanche
Avalanche
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_gasPrice returns the Avalanche C-Chain node's suggested gas price in wei — the per-unit price, denominated in AVAX, that a legacy (type-0) transaction should pay to be picked up promptly. On the C-Chain, fees are commonly quoted in nAVAX (the chain's gwei-equivalent), and this method gives you a single suggested figure rather than the full EIP-1559 breakdown. Call https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114) and the response is hex-encoded wei, for example "0x4a817c800".
gasPrice field when constructing legacy (type-0) AVAX transactions for tooling that does not build EIP-1559 payloads.eth_feeHistory percentiles for a more robust AVAX fee model.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded gas price in wei (e.g. "0x4a817c800" = 20 gwei). |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node could not estimate current gas price. |
eth_maxPriorityFeePerGas together with eth_feeHistory.