BNB Smart Chain
BNB Smart Chain
BNB Smart Chain
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_gasPrice asks a BNB Smart Chain node what single per-gas price it currently recommends, returned as a hex wei value priced in BNB. BSC has historically favored low, fairly stable gas, so this one-number suggestion is often all a simple sender needs. Hit https://bsc.therpc.io/YOUR_API_KEY at chain ID 56 and you get the node's view of the going rate — the figure to drop into the gasPrice slot of a legacy, type-0 transaction.
gasPrice field of a legacy type-0 BNB transaction, the simplest send a wallet can construct.eth_feeHistory percentiles for a sturdier estimate.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded gas price in wei (e.g. "0x4a817c800" = 20 gwei). |
Try it live in the BNB Smart Chain playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node could not estimate current gas price. |
eth_maxPriorityFeePerGas plus eth_feeHistory instead of this single figure.