# 0x Swap Allowance Holder Indicative Price

> 0x Swap Allowance Holder Indicative Price is a paid API for AI agents from agent.api.0x.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-10).

Returns an indicative (non-binding) price quote for a token swap using the 0x Allowance Holder contract, including gas estimates, fees, and route details

## Facts

- Endpoint: GET https://agent.api.0x.org/v1/x402/swap-allowance-holder-price/%7Bpath%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/0x-swap-allowance-holder-indicative-price-20b02cb9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6Uj2wLT2o6gFT0eWQm85e

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 0x-swap-allowance-holder-indicative-price-20b02cb9
```

Example prompt: What's the current indicative price to swap 1 ETH for USDC using 0x's Allowance Holder — including the expected gas fees, route, and minimum amount I'd receive?

## When to prefer this

Use this endpoint when you need a quick, non-binding indicative price for a token swap via the 0x Allowance Holder pattern before committing to a firm quote or executing a trade. Prefer this over the firm quote endpoint when you only need price discovery, want to check liquidity, or are presenting estimated costs to a user without intending to execute immediately. This is ideal for display purposes, pre-trade analysis, or comparing swap costs.

## Known failure modes

- Token pair not supported or liquidity unavailable — liquidityAvailable returns false
- Invalid token address or symbol in query params — 400 bad request
- Unsupported chain or network — error response
- Payment not provided or invalid x402 payment header — 402 Payment Required
- Rate limit exceeded — 429 Too Many Requests
- Stale or missing block number data — may return empty gas or price fields

## How this service works

API proxy for 0x

## Output

Returns a JSON object containing the indicative buy/sell amounts, gas price, total network fee, allowance target address, liquidity availability flag, route details, fee breakdown, issues, and the block number at time of quote. This is a non-binding price estimate, not a firm executable quote.

## 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"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "gas": "",
  "zid": "",
  "fees": {},
  "route": {},
  "issues": {},
  "buyToken": "",
  "gasPrice": "",
  "buyAmount": "",
  "sellToken": "",
  "sellAmount": "",
  "blockNumber": "",
  "minBuyAmount": "",
  "allowanceTarget": "",
  "totalNetworkFee": "",
  "liquidityAvailable": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/0x-swap-allowance-holder-indicative-price-20b02cb9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.api.0x.org](https://www.zero.xyz/host/agent.api.0x.org/llms.txt)
