TriportRPC

eth_gasPrice

Polygon / https://triport.io/polygon

Minimum tier: Free

Polygon method guide

Last updated:

eth_gasPrice returns the node's current best estimate of the gas price on Polygon mainnet (chain ID 0x89 / 137), encoded as a 0x-prefixed hexadecimal string in wei. It takes no parameters. The value represents what the node considers a competitive price for a legacy (pre-EIP-1559) transaction.

Use it when you need a single, simple gas-price figure — for example, when constructing a legacy type: 0x0 transaction that carries a flat gasPrice field, or for a quick fee-level readout in a dashboard.

Prefer EIP-1559 fee methods on Polygon. Since the Bhilai hardfork, Polygon uses the EIP-1559 fee market (a per-block baseFeePerGas plus a priority tip), so a single gasPrice value is a coarse fallback. For accurate fee estimation on EIP-1559 transactions (maxFeePerGas / maxPriorityFeePerGas), use eth_maxPriorityFeePerGas or eth_feeHistory and add a tip. eth_gasPrice remains useful for legacy transactions and for rough, human-readable estimates. Note that Polygon gas prices typically sit well above Ethereum's — values around 30 gwei are common.

Parameters

This method takes no parameters.

Returns

eth_gasPrice return value
FieldType
resultobject

Examples

curl https://triport.io/polygon \
  -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/polygon", {
  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/polygon",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"eth_gasPrice","params":[]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Polygon.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does eth_gasPrice do?
Returns the node's current legacy gas-price suggestion, in wei, as a hex string.
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.