{
  "x402Version": 2,
  "id": 35442,
  "slug": "35442",
  "resource": "https://agentstoolshub.com/api/v1/crypto/gas-fee-calculator",
  "description": "Calculate a transaction's gas fee: gas units × gas price (gwei) gives the ETH cost, multiplied by the ETH price for USD. Exact BigInt math for the wei amounts. Use this when an agent needs to transaction cost in ETH and USD from gas × gwei.",
  "type": "http",
  "serviceName": "AgentTools",
  "resourceType": "Market Data",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x8a0F2b0a6C82D1c54B16E2e4DEcd18fF0802b0f6",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "3000",
      "amountUsd": 0.003,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "analytics": {},
    "bazaar": {
      "info": {
        "input": {
          "method": "GET",
          "queryParams": {
            "ethPriceUsd": 3000,
            "gasUnits": 21000,
            "gweiPrice": 10
          },
          "type": "http"
        },
        "output": {
          "example": {
            "result": {
              "answer": "$0.63",
              "answerLabel": "Transaction fee (USD)",
              "details": [
                {
                  "label": "Fee in ETH",
                  "value": "0.000210000000000000"
                },
                {
                  "label": "Fee in wei (exact)",
                  "value": "210000000000000"
                },
                {
                  "label": "Fee in gwei",
                  "value": "210000"
                },
                {
                  "label": "ETH price used",
                  "value": "$3,000"
                }
              ],
              "steps": [
                "wei = 21000 gas × 10 gwei × 10⁹ = 210000000000000",
                "ETH = 0.000210000000000000 · USD = 0.000210000000000000 × $3,000 = $0.63"
              ],
              "value": 0.63
            },
            "tool": "gas-fee-calculator"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "method": {
                "enum": [
                  "GET"
                ],
                "type": "string"
              },
              "queryParams": {
                "properties": {
                  "ethPriceUsd": {
                    "description": "ETH price (USD)",
                    "type": "number"
                  },
                  "gasUnits": {
                    "description": "Gas units",
                    "type": "number"
                  },
                  "gweiPrice": {
                    "description": "Gas price (gwei)",
                    "type": "number"
                  }
                },
                "required": [
                  "gasUnits",
                  "gweiPrice",
                  "ethPriceUsd"
                ],
                "type": "object"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "crypto",
    "crypto-dev",
    "analytics",
    "bazaar"
  ],
  "sourceHost": "agentstoolshub.com",
  "lastUpdated": "2026-10-11T22:25:12.413Z",
  "quality": {
    "calls30d": 2,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-11T22:25:12.264Z"
  },
  "metadata": {
    "serviceName": "AgentTools",
    "extensions": {
      "analytics": {},
      "bazaar": {
        "info": {
          "input": {
            "method": "GET",
            "queryParams": {
              "ethPriceUsd": 3000,
              "gasUnits": 21000,
              "gweiPrice": 10
            },
            "type": "http"
          },
          "output": {
            "example": {
              "result": {
                "answer": "$0.63",
                "answerLabel": "Transaction fee (USD)",
                "details": [
                  {
                    "label": "Fee in ETH",
                    "value": "0.000210000000000000"
                  },
                  {
                    "label": "Fee in wei (exact)",
                    "value": "210000000000000"
                  },
                  {
                    "label": "Fee in gwei",
                    "value": "210000"
                  },
                  {
                    "label": "ETH price used",
                    "value": "$3,000"
                  }
                ],
                "steps": [
                  "wei = 21000 gas × 10 gwei × 10⁹ = 210000000000000",
                  "ETH = 0.000210000000000000 · USD = 0.000210000000000000 × $3,000 = $0.63"
                ],
                "value": 0.63
              },
              "tool": "gas-fee-calculator"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "method": {
                  "enum": [
                    "GET"
                  ],
                  "type": "string"
                },
                "queryParams": {
                  "properties": {
                    "ethPriceUsd": {
                      "description": "ETH price (USD)",
                      "type": "number"
                    },
                    "gasUnits": {
                      "description": "Gas units",
                      "type": "number"
                    },
                    "gweiPrice": {
                      "description": "Gas price (gwei)",
                      "type": "number"
                    }
                  },
                  "required": [
                    "gasUnits",
                    "gweiPrice",
                    "ethPriceUsd"
                  ],
                  "type": "object"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "agentstoolshub.com",
    "manifest_name": "agentstoolshub.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}