# AmanChain Swap Quote

> AmanChain Swap Quote is a paid API for AI agents from amanchain-relay.gitajhd.workers.dev, paid per call via x402, $0.003732/call, status unknown (last checked 2026-09-14).

Returns an exact AMM swap quote for any token pair using live on-chain consensus state

## Facts

- Endpoint: POST https://amanchain-relay.gitajhd.workers.dev/api/x402/aman-swap-quote
- Price: $0.003732/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/amanchain-swap-quote-93ee5950
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P1yPckhHYydwp0mXKqpMX

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 amanchain-swap-quote-93ee5950 -d '<json body>'
```

Example prompt: What's the exact AMM quote for swapping 500 USDC to AMAN right now — give me the expected output amount and price impact based on live pool state.

## When to prefer this

Choose this endpoint when you need a deterministic, on-chain AMM swap quote executed against real consensus state — especially for AMAN token pairs or AmanChain-native pools. Prefer this over off-chain price feeds when you need the exact executable output amount including slippage and pool depth, rather than a reference market price.

## Known failure modes

- Invalid or unsupported token pair returns an error response
- Insufficient pool liquidity for the requested swap size
- Malformed JSON body or missing required fields returns a 400-level error
- Payment failure or insufficient USDC balance via x402 prevents execution
- Network or node sync issues may return stale or unavailable state

## How this service works

Instant AMM swap quote — exact output amount, price impact and swap fee for any token pair; DeFi exchange-rate and swap pricing API. Deterministic on-chain execution by the AmanChain node — live consensus state, real blocks, pools and balances. Pay per call via x402 (USDC on Base), no account, no API key. POST JSON {"serviceId":"aman-swap-quote","request":"<input>"}.

## Output

Returns an exact, deterministic swap quote computed against live AMM pool state including expected output token amount, effective exchange rate, and price impact for the specified token pair and input amount.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "body": {
     "type": "object"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "example": {
      "ok": true
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/amanchain-swap-quote-93ee5950/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from amanchain-relay.gitajhd.workers.dev](https://www.zero.xyz/host/amanchain-relay.gitajhd.workers.dev/llms.txt)
