Catalog/evm-eip1559-fee

EVM

Compute EIP-1559 gas fee caps API

Compute EIP-1559 maxFeePerGas = baseFee * multiplier + priorityTip (all wei) plus the total cost for a gas limit, using exact integer/bigint math. Answers 'What maxFee should I set for this base fee?','How much will 21000 gas cost?'.

Price$0.01per request
MethodPOST
Route/v1/evm/eip1559-fee
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
evmeip1559gasfeemaxfeeprioritywei
API URLhttps://x402.hexl.dev/v1/evm/eip1559-fee
Integration docs
Example request
{
  "baseFeeWei": "30000000000",
  "priorityFeeWei": "1500000000",
  "baseFeeMultiplier": 2,
  "gasLimit": 21000
}
Example response
{
  "baseFeeWei": "30000000000",
  "priorityFeeWei": "1500000000",
  "baseFeeMultiplier": 2,
  "maxFeePerGasWei": "61500000000",
  "maxPriorityFeePerGasWei": "1500000000",
  "gasLimit": "21000",
  "maxCostWei": "1291500000000000"
}
Input schema
{
  "type": "object",
  "required": [
    "baseFeeWei"
  ],
  "properties": {
    "baseFeeWei": {
      "type": [
        "string",
        "number"
      ],
      "examples": [
        "30000000000"
      ]
    },
    "priorityFeeWei": {
      "type": [
        "string",
        "number"
      ],
      "default": "1500000000",
      "examples": [
        "1500000000"
      ]
    },
    "baseFeeMultiplier": {
      "type": "number",
      "minimum": 1,
      "maximum": 10,
      "default": 2
    },
    "gasLimit": {
      "type": [
        "string",
        "number"
      ],
      "examples": [
        21000
      ]
    }
  },
  "examples": [
    {
      "baseFeeWei": "30000000000",
      "priorityFeeWei": "1500000000",
      "baseFeeMultiplier": 2,
      "gasLimit": 21000
    }
  ]
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}