# Base Transaction Execution Decision API

> Base Transaction Execution Decision API is a paid API for AI agents from base-tx.weatherriskapi.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-16).

Analyzes live Base Mainnet gas fee data to recommend whether an AI agent should execute a transaction now, wait, or stay neutral based on urgency and gas parameters.

## Facts

- Endpoint: POST https://base-tx.weatherriskapi.com/v1/base/transaction-decision?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-transaction-execution-decision-api-697b2c6e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YNlQNcp2tpGvrrT1pM3Dn

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 base-transaction-execution-decision-api-697b2c6e -d '<json body>'
```

Example prompt: Should I submit my Base transaction right now? It's a normal-urgency transfer with an estimated gas limit of 21000 and I can wait up to 30 minutes if fees are high.

## When to prefer this

Choose this endpoint when an AI agent needs a real-time, opinionated go/no-go signal for Base Mainnet transaction submission — especially when gas cost optimization matters and the agent can tolerate a configurable delay. It is ideal for DeFi workflows, automated payouts, or any on-chain action where timing affects cost. Prefer this over manually polling eth_gasPrice when you want a pre-interpreted recommendation with trend context and confidence scoring rather than raw fee data.

## Known failure modes

- Invalid gas limit outside 21000–30000000 range returns a 400 validation error
- Invalid urgency enum value returns a 400 bad request
- maxWaitMinutes outside 0–120 range returns a 400 error
- Base RPC node unavailability may cause 503 or degraded confidence scores
- Payment failure via x402 results in a 402 response before the decision is computed
- Stale RPC data may produce higher dataFreshnessSeconds and lower confidence

## How this service works

Paid decision API for AI agents planning Base Mainnet transactions. Provide an estimated gas limit, urgency, and maximum wait window to receive EXECUTE_NOW, WAIT, or NEUTRAL from fresh public Base RPC fee data. The output includes current gas, recent percentile, short-term trend, an execution-fee estimate, confidence, and reason codes. Price: 0.005 USDC per successful request via x402 v2.

## Output

Returns a JSON object with a top-level decision of EXECUTE_NOW, WAIT, or NEUTRAL, along with the current Base gas price in Gwei, the gas percentile relative to recent history, a short-term trend label (e.g. STABLE/RISING/FALLING), an estimated network fee in ETH, a confidence score (0–100), reason codes explaining the decision, data freshness in seconds, and a recommended wait time in minutes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "urgency": {
   "enum": [
    "low",
    "normal",
    "high"
   ],
   "type": "string",
   "description": "Tolerance for delay: low favors waiting when current gas is expensive; normal balances price and time; high never returns WAIT."
  },
  "gasLimit": {
   "type": "integer",
   "maximum": 30000000,
   "minimum": 21000,
   "description": "Estimated execution gas units for the planned Base transaction. Obtain this from transaction construction or eth_estimateGas; this API does not estimate it."
  },
  "maxWaitMinutes": {
   "type": "integer",
   "maximum": 120,
   "minimum": 0,
   "description": "Maximum acceptable delay. Zero means waiting is unavailable and produces EXECUTE_NOW."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "trend": "STABLE",
  "source": "Base Mainnet JSON-RPC",
  "decision": "EXECUTE_NOW",
  "confidence": 72,
  "limitations": [
   "Execution-fee estimate excludes L1 data and operator fees."
  ],
  "reasonCodes": [
   "CURRENT_GAS_BELOW_RECENT_MEDIAN"
  ],
  "currentGasGwei": "0.006",
  "recentPercentile": 33,
  "dataFreshnessSeconds": 2,
  "estimatedNetworkFeeEth": "0.00000108",
  "recommendedWaitMinutes": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-transaction-execution-decision-api-697b2c6e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-tx.weatherriskapi.com](https://www.zero.xyz/host/base-tx.weatherriskapi.com/llms.txt)
