eth_gasPrice
BNB Smart Chain / https://triport.io/rpc/bsc
Minimum tier: Free
Last updated:
eth_gasPrice returns the selected node's current gas-price estimate as an EVM hex quantity denominated in wei per gas.
Use it as a simple fee input for callers that do not need a historical distribution. Decode the quantity before presenting it in another denomination.
This is a point estimate, unlike eth_feeHistory, which returns a block window and reward percentiles. eth_maxPriorityFeePerGas returns only a priority-fee estimate.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| gasPrice | Quantity |
Examples
curl https://triport.io/rpc/bsc \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_gasPrice","params":[]}'const res = await fetch("https://triport.io/rpc/bsc", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "eth_gasPrice",
"params": []
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/rpc/bsc",
headers={"Authorization": "Bearer <api-key>"},
json={"jsonrpc":"2.0","id":1,"method":"eth_gasPrice","params":[]},
)
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Chain: BNB Smart Chain.
- Clusters: mainnet.
- Credit cost: 1 per call.
FAQ
- What does eth_gasPrice do?
- Return the current gas-price estimate.
- How many credits does eth_gasPrice cost?
- eth_gasPrice costs 1 credit(s) per call on Triport by default.
- Is eth_gasPrice available over WebSocket?
- eth_gasPrice is an HTTP JSON-RPC method.