Skip to Content

Gas

compareGas

Returns current base fee and priority fee for every EVM chain with estimated USD cost for a simple transfer (hardcoded at 21,000 gas). Sorted cheapest first. Uses live native token prices. Actual tx costs vary by type - token transfers, swaps, etc. use significantly more gas.

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "compareGas",
  "params": {},
  "id": 1
}

Response Fields

FieldType
dataobject
resultsobject[]
chainstring
baseFeeGweinumber
priorityFeeGweinumber
estimatedTxCostUsdinteger
updatedAtstring
Try It
{
  "jsonrpc": "2.0",
  "method": "compareGas",
  "params": {},
  "id": 1
}

estimateGas

Estimates the gas required for a transaction without actually sending it. Useful for determining gas limits before submitting transactions.

curl -X POST https://your-endpoint.simplystaking.xyz/v1 \
  -H "Content-Type: application/json" \
{
  "jsonrpc": "2.0",
  "method": "estimateGas",
  "params": {
    "chain": "ethereum",
    "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  },
  "id": 1
}

Parameters

NameRequiredDescription
chainyesNetwork slug
toyesDestination address
e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
fromnoSender address
e.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
valuenoETH value in hex wei (e.g. 0xde0b6b3a7640000 = 1 ETH)
datanoContract call data (hex encoded)

Response Fields

FieldType
dataobject
chainstring
gasEstimateinteger
gasEstimateHexstring

Supported Networks

EthereumPolygonBNB ChainOptimismBaseAvalancheArbitrumGnosisMoonbeamLineaHyperliquid
Try It
{
  "jsonrpc": "2.0",
  "method": "estimateGas",
  "params": {
    "chain": "ethereum",
    "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  },
  "id": 1
}