Historical gas price analytics for Base with averages, percentiles, trends, and best-time-to-transact predictions.
What it does
This x402-enabled endpoint provides advanced gas price analytics for the Base L2 network. It returns historical gas data including 1-hour, 6-hour, and 24-hour averages, percentile breakdowns (P25, P50, P75, P95), min/max values, trend detection (rising, falling, or stable), and a prediction of the best time to submit transactions for lower fees.
The endpoint is accessed via HTTP GET and accepts query parameters such as `chain=base`, `hours=24`, and `demo=true`. A free demo mode is available (up to 10 calls per IP per hour) by appending `?demo=true`. Paid access costs $0.005 per call, settled in USDC on Base (x402 protocol) or pathUSD on Tempo (MPP protocol). No API keys or subscriptions are required — payment is handled inline via the x402 `X-PAYMENT` header or MPP `Authorization: Payment` header.
The endpoint is part of the httpay.xyz marketplace, which hosts over 300 pay-per-call API endpoints across categories like crypto, DeFi, utilities, and web scraping. Integration options include the x402-fetch npm package, the @httpay/mcp server for Claude/Cursor agents, or direct curl with payment headers.
Capabilities
Use cases
- —Optimizing transaction submission timing on Base to minimize gas costs
- —Monitoring gas price trends over 1h/6h/24h windows for DeFi bots
- —Building dashboards that display gas percentile distributions
- —AI agents autonomously checking gas conditions before executing on-chain actions
- —Alerting systems that detect rising or falling gas trends
Fit
Best for
- —DeFi developers optimizing transaction costs on Base
- —AI agents that need real-time gas intelligence before on-chain operations
- —Analytics dashboards tracking Base network gas conditions
Not for
- —Gas tracking on chains other than Base (only Base is documented)
- —Free high-volume usage (demo limited to 10 calls/IP/hour; paid access required beyond that)
Quick start
# Free demo (10 calls/IP/hour)
curl "https://httpay.xyz/api/gas-tracker-advanced?chain=base&hours=24&demo=true"
# Paid via x402-fetch
npm install x402-fetch
# then in code:
import { withPayment } from "x402-fetch";
const res = await withPayment(
fetch("https://httpay.xyz/api/gas-tracker-advanced?chain=base&hours=24"),
wallet
);Example
Response
{
"max": 0.005,
"min": 0.0005,
"chain": "base",
"hours": 24,
"trend": "stable",
"averages": {
"1h": 0.0012,
"6h": 0.0015,
"24h": 0.0018
},
"percentiles": {
"p25": 0.001,
"p50": 0.0014,
"p75": 0.002,
"p95": 0.0035
},
"bestTimeToTransact": "03:00-05:00 UTC"
}Endpoint
Quality
The endpoint is live (402 challenge captured) with clear pricing and protocol details, but there is no actual response example or OpenAPI schema documenting the output fields. The response example above is inferred from the description text and is not sourced from real data. Docs pages return 404.
Warnings
- —No OpenAPI schema available for this specific endpoint — output fields are inferred from the description only
- —The example_response_json is fabricated based on the endpoint description; no real response sample was captured
- —Documentation pages (/docs, /pricing, /README) all return 404
- —robots.txt disallows /api/ crawling (except specific paths), so automated discovery is limited
- —Query parameters (chain, hours) are mentioned in the description but not formally documented in the schema
Citations
- —Endpoint costs 5000 base units of USDC (= $0.005) per call on Basehttps://httpay.xyz/api/gas-tracker-advanced
- —Also supports MPP payment via Tempo with pathUSD at $0.005https://httpay.xyz/api/gas-tracker-advanced
- —Demo mode available at 10 calls/IP/hour with ?demo=truehttps://httpay.xyz/api/gas-tracker-advanced
- —httpay.xyz hosts 307+ pay-per-call endpoints on Basehttps://httpay.xyz
- —Integration via npx @httpay/mcp or npm install x402-fetchhttps://httpay.xyz