82trust / 100

Gas Oracle

by Otto AI in Other

x402 APIPassing, checked 59 min ago

Base gas oracle from Otto's own RPC: current base fee (wei+gwei), legacy gas price, and slow/standard/fast EIP-1559 priority-fee tiers (p25/p50/p90 over the last 20 blocks) with a ready-to-sign maxFeePerGas per tier. Unlike the crowded gas shelf it PUBLISHES the formula, so every tier is reproducible from the response. Flat JSON, refreshed every minute. Base gas oracle, gas price, priority fee, EIP-1559, maxFeePerGas. $0.001 per call.

GET https://x402.ottoai.services/gas-oracle

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
261 ms typical, 261 ms slowest 5%
Last check
59 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://x402.ottoai.services/gas-oracle"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402.ottoai.services%2Fgas-oracle
const res = await pay("https://x402.ottoai.services/gas-oracle");
console.log(await res.json());

Example input

{}

Example output

{
  "data": {
    "baseFeePerGas": {
      "gwei": 0.005,
      "wei": "5000000"
    },
    "chain": "base",
    "chainId": 8453,
    "formula": "priorityFee tiers = mean of the p25/p50/p90 priority-fee tips over the last 20 blocks (eth_feeHistory); suggested maxFeePerGas = baseFeePerGas*2 + tierTip.",
    "gasPrice": {
      "gwei": 0.006,
      "wei": "6000000"
    },
    "generatedAt": "2026-09-01T12:01:00.000Z",
    "priorityFeePerGas": {
      "fast": 0.0025,
      "slow": 0,
      "standard": 0.00025,
      "unit": "gwei"
    },
    "suggested": {
      "fast": {
        "maxFeePerGasGwei": 0.0125,
        "maxFeePerGasWei": "12500000",
        "maxPriorityFeePerGasGwei": 0.0025
      },
      "slow": {
        "maxFeePerGasGwei": 0.01,
        "maxFeePerGasWei": "10000000",
        "maxPriorityFeePerGasGwei": 0
      },
      "standard": {
        "maxFeePerGasGwei": 0.01025,
        "maxFeePerGasWei": "10250000",
        "maxPriorityFeePerGasGwei": 0.00025
      }
    },
    "window": {
      "avgGasUsedRatio": 0.1132,
      "blocks": 20,
      "congestion": "low",
      "oldestBlock": 50738536
    }
  },
  "meta": {
    "degraded": false,
    "generatedAt": "",
    "stalenessSec": 0,
    "validUntil": ""
  },
  "status": "success"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
59 min agoPassed402261 ms$0.001
4 h agoPassed402368 ms$0.001
9 h agoPassed40266 ms$0.001