# Plexa /v1/quote — On-Chain Swap Quote with Price Impact & Route

> Plexa /v1/quote — On-Chain Swap Quote with Price Impact & Route is a paid API for AI agents from api.getplexa.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Returns the realizable fill price, price impact (bps), depth, routing, and worst-case slippage for a token swap on Base, Polygon, or Arbitrum using canonical on-chain quoters.

## Facts

- Endpoint: POST https://api.getplexa.com/v1/quote
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/plexa-v1-quote-on-chain-swap-quote-with-price-impact-route-f9ec7609
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Jd4uNIFvuL5D656Xn2GGL

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 plexa-v1-quote-on-chain-swap-quote-with-price-impact-route-f9ec7609 -d '<json body>'
```

Example prompt: What's the realizable fill price and price impact if I swap $5000 USDC for WETH on Arbitrum right now — including the route and worst-case slippage?

## When to prefer this

Use this endpoint when you need the actual realizable fill price for a swap — accounting for price impact, depth, and slippage — rather than a mid-price or spot feed. Ideal for pre-trade analysis, trade sizing decisions, or comparing execution quality across Base, Polygon, and Arbitrum before submitting a transaction.

## Known failure modes

- Invalid or unsupported token address returns an error
- Both sizeIn and sizeUSD provided simultaneously causes a validation error
- Neither sizeIn nor sizeUSD provided causes a validation error
- Unsupported chain identifier returns an error
- Insufficient on-chain liquidity may result in low confidence or no quote
- Payment failure (x402) results in 402 status before quote is returned

## How this service works

Plexa /v1/quote — executable swap quote: the realizable fill price at your trade size, not a mid/spot price feed. Returns price impact (bps), worst-case slippage, depth and the per-leg route across Base/Polygon/Arbitrum liquidity, from canonical on-chain quoters. Call it before a swap to see what the fill actually costs. Informational data, not financial advice.

## Output

Returns the actual executable fill price for the swap (not mid/spot), price impact in basis points, available liquidity depth, the per-leg DEX routing path, worst-case slippage estimate, and a confidence score. All derived from canonical on-chain quoters for the specified chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "polygon",
    "matic",
    "arbitrum",
    "arbitrum-one",
    "arb",
    "eip155:8453",
    "eip155:137",
    "eip155:42161"
   ],
   "type": "string",
   "description": "Optional, default \"base\". One of: base | polygon | matic | arbitrum | arbitrum-one | arb | eip155:8453 | eip155:137 | eip155:42161 — case-sensitive (see `enum`). This is the chain the QUOTE is computed on; the networks you may PAY on (including Solana) are a separate list in `accepts[]`."
  },
  "sizeIn": {
   "type": "string",
   "pattern": "^(?:0\\.\\d*[1-9]\\d*|[1-9]\\d*(?:\\.\\d+)?)$",
   "maxLength": 78,
   "description": "Trade size as a human amount of tokenIn, e.g. \"1.5\" for 1.5 WETH. A STRING, not a number. At least one of sizeIn / sizeUSD is required; if BOTH are sent, sizeUSD wins and sizeIn is ignored."
  },
  "sizeUSD": {
   "type": "string",
   "pattern": "^(?:0\\.\\d*[1-9]\\d*|[1-9]\\d*(?:\\.\\d+)?)$",
   "maxLength": 78,
   "description": "Trade size as a USD notional, e.g. \"5000\". A STRING, not a number; positive, no thousands separator (\"5,000\" is rejected) and no exponent (\"5e3\" is rejected) — see `pattern`. At least one of sizeIn / sizeUSD is required; if BOTH are sent, sizeUSD wins."
  },
  "tokenIn": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "ERC-20 being SOLD. 0x + 40 hex (see `pattern`) — a symbol like \"USDC\" is rejected with 400."
  },
  "tokenOut": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "ERC-20 being BOUGHT. 0x + 40 hex (see `pattern`) — a symbol like \"WETH\" is rejected with 400."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/plexa-v1-quote-on-chain-swap-quote-with-price-impact-route-f9ec7609/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.getplexa.com](https://www.zero.xyz/host/api.getplexa.com/llms.txt)
