# x402 Market Buy Advisor

> x402 Market Buy Advisor is a paid API for AI agents from x402-agent-suite-production.up.railway.app, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-14).

Evaluates a planned API purchase request and returns ranked quotes plus a buy/skip recommendation with confidence score for AI agents spending USDC on x402 markets.

## Facts

- Endpoint: POST https://x402-agent-suite-production.up.railway.app/api/market/buy-advisor
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-market-buy-advisor-c4438b07
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hVyNTBMh6ZcupdBrv3q99

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 x402-market-buy-advisor-c4438b07 -d '<json body>'
```

Example prompt: Before my agent pays for that x402 GET call to the weather endpoint, check the buy advisor — get me ranked quotes and tell me if it should pay or skip, including the all-in USDC cost and confidence level.

## When to prefer this

Use this endpoint when an AI agent needs to make a cost-aware purchasing decision before executing a paid x402 API call — particularly when comparing multiple providers, enforcing spend policies, or maximizing confidence that the payment is justified. Prefer over blind payment when budget management or policy compliance matters.

## Known failure modes

- Missing required 'input.type' or 'input.method' fields returns validation error
- Unsupported HTTP method (POST/PUT/PATCH) rejected by enum constraint
- No quotes available if target endpoint is unreachable or not listed on x402 markets
- Payment of $0.08 USDC required before response is returned; missing payment returns 402
- Low confidence recommendation if market data is sparse or stale

## How this service works

24 paid x402 infrastructure APIs for AI agent fleets: buy advisor, audition coach, guard, proxy, MPP, attestations, and pipeline orchestration.

## Output

Returns a JSON object with: a list of ranked quotes (provider name, rank, all-in cost in USDC, whether payment is required), a top recommendation (action like 'pay_external', URL, network, all-in cost, confidence score 0–1, rationale), a policy evaluation (allowed boolean, summary), and a status/summary string with a checkedAt timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "ok",
      "allowed",
      "summary",
      "intent",
      "checkedAt",
      "recommendation",
      "quotes",
      "policy"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "intent": {
       "type": "string"
      },
      "policy": {
       "type": "object",
       "required": [
        "evaluated",
        "allowed",
        "summary"
       ],
       "properties": {
        "allowed": {
         "type": "boolean"
        },
        "summary": {
         "type": "string"
        },
        "evaluated": {
         "type": "boolean"
        }
       }
      },
      "quotes": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "rank",
         "name",
         "allInCostUsdc",
         "requiresPayment"
        ],
        "properties": {
         "name": {
          "type": "string"
         },
         "rank": {
          "type": "number"
         },
         "allInCostUsdc": {
          "type": "number"
         },
         "requiresPayment": {
          "type": "boolean"
         }
        }
       }
      },
      "status": {
       "type": "string"
      },
      "allowed": {
       "type": "boolean"
      },
      "summary": {
       "type": "string"
      },
      "checkedAt": {
       "type": "string"
      },
      "recommendation": {
       "type": "object",
       "required": [
        "action",
        "url",
        "network",
        "allInCostUsdc",
        "confidence",
        "rationale"
       ],
       "properties": {
        "url": {
         "type": "string"
        },
        "action": {
         "type": "string"
        },
        "network": {
         "type": "string"
        },
        "rationale": {
         "type": "string"
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "quotes": [
   {
    "name": "Example API",
    "rank": 1,
    "allInCostUsdc": 0.05
   }
  ],
  "recommendation": {
   "action": "pay_external",
   "confidence": 0.85
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-market-buy-advisor-c4438b07/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-suite-production.up.railway.app](https://www.zero.xyz/host/x402-agent-suite-production.up.railway.app/llms.txt)
