{
  "x402Version": 2,
  "id": 72555,
  "slug": "saylorinnovations-api-evm-gas-cost",
  "resource": "https://saylorinnovations.com/api/evm/gas-cost",
  "description": "Transaction fee in native token and USD for a transfer, swap, mint, approve or custom gas amount on any EVM chain, from base fee, tip and token price.",
  "type": "http",
  "serviceName": "Saylor Innovations Data Desk",
  "mimeType": "application/json",
  "resourceType": "API",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "eip155:137",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "eip155:42161",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "So11111111111111111111111111111111111111112",
      "amount": "95830",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    }
  ],
  "outputSchema": {
    "type": "object",
    "properties": {
      "base_fee_gwei": {
        "type": "number",
        "description": "Base fee used"
      },
      "priority_fee_gwei": {
        "type": "number",
        "description": "Priority fee used"
      },
      "total_gas_price_gwei": {
        "type": "number",
        "description": "Base fee plus tip"
      },
      "native_price_usd": {
        "type": "number",
        "description": "Native token price used"
      },
      "custom": {
        "type": [
          "object",
          "null"
        ],
        "description": "Cost of your own gas amount, or null"
      },
      "typical_operations": {
        "type": "array",
        "description": "Cost of common operations at this gas price",
        "items": {
          "type": "object",
          "properties": {
            "operation": {
              "description": "Operation name",
              "type": [
                "string",
                "null"
              ]
            },
            "gas_units": {
              "description": "Typical gas used",
              "type": [
                "number",
                "null"
              ]
            },
            "native_cost": {
              "description": "Fee in the native token",
              "type": [
                "number",
                "null"
              ]
            },
            "usd_cost": {
              "description": "Fee in USD",
              "type": [
                "number",
                "null"
              ]
            }
          }
        }
      },
      "cost_if_gas_doubles_for_swap_usd": {
        "type": "number",
        "description": "USD cost of a swap if the gas price doubled"
      },
      "note": {
        "type": "string",
        "description": "Plain-language caveat about how to read and use the result"
      },
      "source": {
        "type": "string",
        "description": "Where the data or formula comes from"
      }
    },
    "required": [
      "total_gas_price_gwei",
      "typical_operations"
    ]
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "type": "http",
          "method": "GET",
          "queryParams": {
            "base_fee_gwei": "12",
            "native_price_usd": "3500",
            "priority_fee_gwei": "1.5"
          }
        },
        "output": {
          "type": "json",
          "example": {
            "base_fee_gwei": 12,
            "priority_fee_gwei": 1.5,
            "total_gas_price_gwei": 13.5,
            "native_price_usd": 3500,
            "custom": null,
            "typical_operations": [
              {
                "operation": "native transfer",
                "gas_units": 21000,
                "native_cost": 0.0002835,
                "usd_cost": 0.9923
              },
              {
                "operation": "ERC-20 transfer",
                "gas_units": 65000,
                "native_cost": 0.0008775,
                "usd_cost": 3.0713
              },
              {
                "operation": "ERC-20 approve",
                "gas_units": 46000,
                "native_cost": 0.000621,
                "usd_cost": 2.1735
              },
              {
                "operation": "DEX swap",
                "gas_units": 150000,
                "native_cost": 0.002025,
                "usd_cost": 7.0875
              },
              {
                "operation": "NFT mint",
                "gas_units": 120000,
                "native_cost": 0.00162,
                "usd_cost": 5.67
              },
              {
                "operation": "NFT transfer",
                "gas_units": 85000,
                "native_cost": 0.0011475,
                "usd_cost": 4.0163
              },
              {
                "operation": "add liquidity",
                "gas_units": 220000,
                "native_cost": 0.00297,
                "usd_cost": 10.395
              },
              {
                "operation": "bridge deposit",
                "gas_units": 180000,
                "native_cost": 0.00243,
                "usd_cost": 8.505
              },
              {
                "operation": "contract deployment (small)",
                "gas_units": 800000,
                "native_cost": 0.0108,
                "usd_cost": 37.8
              }
            ],
            "cost_if_gas_doubles_for_swap_usd": 14.175,
            "note": "Typical gas units are rough averages; real usage varies by contract. Works for any EVM chain: pass that chain base fee and its native token price.",
            "source": "EVM gas fee arithmetic (units x gas price)"
          }
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "input": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "http"
              },
              "method": {
                "type": "string",
                "enum": [
                  "GET"
                ]
              },
              "queryParams": {
                "type": "object",
                "properties": {
                  "base_fee_gwei": {
                    "type": "string",
                    "description": "current base fee in gwei"
                  },
                  "native_price_usd": {
                    "type": "string",
                    "description": "price of the chain native token"
                  },
                  "priority_fee_gwei": {
                    "type": "string",
                    "description": "optional tip, default 1"
                  }
                },
                "required": [
                  "base_fee_gwei",
                  "native_price_usd"
                ]
              }
            },
            "required": [
              "type",
              "method"
            ],
            "additionalProperties": false
          },
          "output": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "json"
              },
              "example": {
                "type": "object",
                "properties": {
                  "base_fee_gwei": {
                    "type": "number",
                    "description": "Base fee used"
                  },
                  "priority_fee_gwei": {
                    "type": "number",
                    "description": "Priority fee used"
                  },
                  "total_gas_price_gwei": {
                    "type": "number",
                    "description": "Base fee plus tip"
                  },
                  "native_price_usd": {
                    "type": "number",
                    "description": "Native token price used"
                  },
                  "custom": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Cost of your own gas amount, or null"
                  },
                  "typical_operations": {
                    "type": "array",
                    "description": "Cost of common operations at this gas price",
                    "items": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "description": "Operation name",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "gas_units": {
                          "description": "Typical gas used",
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "native_cost": {
                          "description": "Fee in the native token",
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "usd_cost": {
                          "description": "Fee in USD",
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "cost_if_gas_doubles_for_swap_usd": {
                    "type": "number",
                    "description": "USD cost of a swap if the gas price doubled"
                  },
                  "note": {
                    "type": "string",
                    "description": "Plain-language caveat about how to read and use the result"
                  },
                  "source": {
                    "type": "string",
                    "description": "Where the data or formula comes from"
                  }
                },
                "required": [
                  "total_gas_price_gwei",
                  "typical_operations"
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        },
        "required": [
          "input"
        ]
      }
    }
  },
  "tags": [
    "ethereum transaction cost",
    "gas fee in dollars for a swap",
    "erc20 transfer gas cost",
    "evm fee calculator gwei to usd",
    "base mainnet gas cost estimate"
  ],
  "sourceHost": "saylorinnovations.com",
  "lastUpdated": "2026-10-26T22:14:01.961Z",
  "quality": {},
  "metadata": {
    "serviceName": "Saylor Innovations Data Desk",
    "method": "GET",
    "mimeType": "application/json",
    "inputSchema": {
      "type": "object",
      "properties": {
        "base_fee_gwei": {
          "type": "string",
          "description": "current base fee in gwei"
        },
        "native_price_usd": {
          "type": "string",
          "description": "price of the chain native token"
        },
        "priority_fee_gwei": {
          "type": "string",
          "description": "optional tip, default 1"
        }
      },
      "required": [
        "base_fee_gwei",
        "native_price_usd"
      ]
    },
    "exampleResponse": {
      "base_fee_gwei": 12,
      "priority_fee_gwei": 1.5,
      "total_gas_price_gwei": 13.5,
      "native_price_usd": 3500,
      "custom": null,
      "typical_operations": [
        {
          "operation": "native transfer",
          "gas_units": 21000,
          "native_cost": 0.0002835,
          "usd_cost": 0.9923
        },
        {
          "operation": "ERC-20 transfer",
          "gas_units": 65000,
          "native_cost": 0.0008775,
          "usd_cost": 3.0713
        },
        {
          "operation": "ERC-20 approve",
          "gas_units": 46000,
          "native_cost": 0.000621,
          "usd_cost": 2.1735
        },
        {
          "operation": "DEX swap",
          "gas_units": 150000,
          "native_cost": 0.002025,
          "usd_cost": 7.0875
        },
        {
          "operation": "NFT mint",
          "gas_units": 120000,
          "native_cost": 0.00162,
          "usd_cost": 5.67
        },
        {
          "operation": "NFT transfer",
          "gas_units": 85000,
          "native_cost": 0.0011475,
          "usd_cost": 4.0163
        },
        {
          "operation": "add liquidity",
          "gas_units": 220000,
          "native_cost": 0.00297,
          "usd_cost": 10.395
        },
        {
          "operation": "bridge deposit",
          "gas_units": 180000,
          "native_cost": 0.00243,
          "usd_cost": 8.505
        },
        {
          "operation": "contract deployment (small)",
          "gas_units": 800000,
          "native_cost": 0.0108,
          "usd_cost": 37.8
        }
      ],
      "cost_if_gas_doubles_for_swap_usd": 14.175,
      "note": "Typical gas units are rough averages; real usage varies by contract. Works for any EVM chain: pass that chain base fee and its native token price.",
      "source": "EVM gas fee arithmetic (units x gas price)"
    },
    "parameterLocation": "query",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "type": "http",
            "method": "GET",
            "queryParams": {
              "base_fee_gwei": "12",
              "native_price_usd": "3500",
              "priority_fee_gwei": "1.5"
            }
          },
          "output": {
            "type": "json",
            "example": {
              "base_fee_gwei": 12,
              "priority_fee_gwei": 1.5,
              "total_gas_price_gwei": 13.5,
              "native_price_usd": 3500,
              "custom": null,
              "typical_operations": [
                {
                  "operation": "native transfer",
                  "gas_units": 21000,
                  "native_cost": 0.0002835,
                  "usd_cost": 0.9923
                },
                {
                  "operation": "ERC-20 transfer",
                  "gas_units": 65000,
                  "native_cost": 0.0008775,
                  "usd_cost": 3.0713
                },
                {
                  "operation": "ERC-20 approve",
                  "gas_units": 46000,
                  "native_cost": 0.000621,
                  "usd_cost": 2.1735
                },
                {
                  "operation": "DEX swap",
                  "gas_units": 150000,
                  "native_cost": 0.002025,
                  "usd_cost": 7.0875
                },
                {
                  "operation": "NFT mint",
                  "gas_units": 120000,
                  "native_cost": 0.00162,
                  "usd_cost": 5.67
                },
                {
                  "operation": "NFT transfer",
                  "gas_units": 85000,
                  "native_cost": 0.0011475,
                  "usd_cost": 4.0163
                },
                {
                  "operation": "add liquidity",
                  "gas_units": 220000,
                  "native_cost": 0.00297,
                  "usd_cost": 10.395
                },
                {
                  "operation": "bridge deposit",
                  "gas_units": 180000,
                  "native_cost": 0.00243,
                  "usd_cost": 8.505
                },
                {
                  "operation": "contract deployment (small)",
                  "gas_units": 800000,
                  "native_cost": 0.0108,
                  "usd_cost": 37.8
                }
              ],
              "cost_if_gas_doubles_for_swap_usd": 14.175,
              "note": "Typical gas units are rough averages; real usage varies by contract. Works for any EVM chain: pass that chain base fee and its native token price.",
              "source": "EVM gas fee arithmetic (units x gas price)"
            }
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "input": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "http"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                },
                "queryParams": {
                  "type": "object",
                  "properties": {
                    "base_fee_gwei": {
                      "type": "string",
                      "description": "current base fee in gwei"
                    },
                    "native_price_usd": {
                      "type": "string",
                      "description": "price of the chain native token"
                    },
                    "priority_fee_gwei": {
                      "type": "string",
                      "description": "optional tip, default 1"
                    }
                  },
                  "required": [
                    "base_fee_gwei",
                    "native_price_usd"
                  ]
                }
              },
              "required": [
                "type",
                "method"
              ],
              "additionalProperties": false
            },
            "output": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "json"
                },
                "example": {
                  "type": "object",
                  "properties": {
                    "base_fee_gwei": {
                      "type": "number",
                      "description": "Base fee used"
                    },
                    "priority_fee_gwei": {
                      "type": "number",
                      "description": "Priority fee used"
                    },
                    "total_gas_price_gwei": {
                      "type": "number",
                      "description": "Base fee plus tip"
                    },
                    "native_price_usd": {
                      "type": "number",
                      "description": "Native token price used"
                    },
                    "custom": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Cost of your own gas amount, or null"
                    },
                    "typical_operations": {
                      "type": "array",
                      "description": "Cost of common operations at this gas price",
                      "items": {
                        "type": "object",
                        "properties": {
                          "operation": {
                            "description": "Operation name",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "gas_units": {
                            "description": "Typical gas used",
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "native_cost": {
                            "description": "Fee in the native token",
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "usd_cost": {
                            "description": "Fee in USD",
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "cost_if_gas_doubles_for_swap_usd": {
                      "type": "number",
                      "description": "USD cost of a swap if the gas price doubled"
                    },
                    "note": {
                      "type": "string",
                      "description": "Plain-language caveat about how to read and use the result"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the data or formula comes from"
                    }
                  },
                  "required": [
                    "total_gas_price_gwei",
                    "typical_operations"
                  ]
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "required": [
            "input"
          ]
        }
      }
    },
    "examples": [
      {
        "label": "Unpaid discovery call",
        "method": "GET",
        "url": "https://saylorinnovations.com/api/evm/gas-cost?base_fee_gwei=12&priority_fee_gwei=1.5&native_price_usd=3500",
        "expectedStatus": 402
      }
    ],
    "cacheTtlSeconds": 0,
    "capabilities": [],
    "noAccountRequired": true,
    "noApiKeyRequired": true,
    "sideEffects": "Paid calls settle the advertised payment; see the provider contract for execution behavior.",
    "payment": {
      "protocol": "x402",
      "settlement": "direct-to-provider"
    },
    "provider": {
      "name": "Saylor Innovations",
      "host": "saylorinnovations.com",
      "manifestUrl": "https://saylorinnovations.com/.well-known/x402.json"
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": true,
  "featured": false,
  "provider": {
    "host": "saylorinnovations.com",
    "manifest_name": "Saylor Innovations Knowledge Base",
    "source": "submitted",
    "source_manifest_url": "https://saylorinnovations.com/.well-known/x402.json",
    "submitted_at": "2026-10-26T05:52:02.113Z"
  },
  "exampleResponse": {
    "base_fee_gwei": 0,
    "priority_fee_gwei": 0,
    "total_gas_price_gwei": 0,
    "native_price_usd": 0,
    "custom": {},
    "typical_operations": [
      {
        "operation": "string",
        "gas_units": 0,
        "native_cost": 0,
        "usd_cost": 0
      }
    ],
    "cost_if_gas_doubles_for_swap_usd": 0,
    "note": "string",
    "source": "string"
  }
}