# d21 Gas Price

> d21 Gas Price is a paid API for AI agents from draconic21-x402-api.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Returns live Base mainnet gas prices (legacy, EIP-1559 base fee, and suggested priority/max fee) plus a plain-transfer cost estimate, all in gwei, read directly from Base's public JSON-RPC.

## Facts

- Endpoint: POST https://draconic21-x402-api.onrender.com/v1/gas_price?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/d21-gas-price-0a341ba9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hbQ8sllVDDNi76lv00gca

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability d21-gas-price-0a341ba9 -d '<json body>'
```

Example prompt: What are the current gas prices on Base mainnet right now — give me the legacy price, EIP-1559 base fee, and suggested max fee in gwei, plus the cost estimate for a plain ETH transfer.

## When to prefer this

Choose this endpoint when you need real-time, multi-format gas price data specifically for Base mainnet — including both legacy and EIP-1559 fee structures — without relying on a third-party gas oracle. Ideal for agents that need to set transaction fees programmatically or estimate transfer costs before executing on-chain actions on Base.

## Known failure modes

- Base public JSON-RPC unavailable or slow — may return error or stale data
- Invalid chain value (anything other than 'base') returns an error
- Service cold-start latency on Render may cause timeouts
- Rate limiting or payment failure returns 402 or 429

## How this service works

Gas Price ($0.002): current Base gas market read live from Base's own public JSON-RPC, not a hosted gas-oracle vendor -- legacy gas price (eth_gasPrice), EIP-1559 base fee (latest block), and a suggested priority/max fee (eth_maxPriorityFeePerGas + a computed 2x-base-fee heuristic), all in gwei, plus a plain-transfer cost estimate. Base mainnet only. Body {} or { chain: "base" }. Check free /v1/gas_price/availability first.

## Output

Returns a JSON object containing: legacy gas price (eth_gasPrice in gwei), EIP-1559 base fee from the latest block (in gwei), a suggested priority fee (eth_maxPriorityFeePerGas in gwei), a computed max fee using a 2x base fee heuristic (in gwei), and an estimated cost for a plain ETH transfer — all sourced live from Base's public JSON-RPC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base"
   ],
   "type": "string",
   "description": "Only 'base' is supported today; omit or pass \"base\"."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/d21-gas-price-0a341ba9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from draconic21-x402-api.onrender.com](https://www.zero.xyz/host/draconic21-x402-api.onrender.com/llms.txt)
