# Polygon DEX Best Execution Router

> Polygon DEX Best Execution Router is a paid API for AI agents from x402.donnyautomation.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns the optimal buy and sell venues across QuickSwap, SushiSwap, and Uniswap v3 on Polygon PoS, including cross-exchange spread in basis points, fee-adjusted arbitrage spread, and optimal trade size for a given token pair.

## Facts

- Endpoint: GET https://x402.donnyautomation.com/polygon/route
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polygon-dex-best-execution-router-ca1341ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Gvt1UlqiJ2FHKPkVidT1L

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 polygon-dex-best-execution-router-ca1341ab
```

Example prompt: Check which DEX on Polygon gives me the best execution for buying WMATIC with USDC right now — I want to know the cheapest buy venue, the best sell venue, the spread in basis points, and the optimal trade size for the WMATIC/USDC pair.

## When to prefer this

Choose this endpoint when you need real-time best-execution routing specifically on Polygon PoS across QuickSwap, SushiSwap, and Uniswap v3. Prefer it over generic price feeds when you need cross-DEX spread analysis, fee-adjusted arbitrage metrics, and optimal trade sizing in a single call. Use the Arbitrum or Base sibling endpoints for those respective chains instead.

## Known failure modes

- Unsupported token pair returns an error or empty result
- Highly illiquid pairs may return unreliable spread estimates
- Network congestion on Polygon may cause stale price data
- Malformed pair symbol (e.g. missing slash or wrong ticker) returns a validation error
- Payment failure (insufficient USDC balance for x402 micropayment) blocks the call

## How this service works

Cheapest venue to buy and richest to sell ONE pair on Polygon PoS across QuickSwap, SushiSwap and Uniswap v3. Returns buyAt and sellAt (venue, price, tvlUsd), midSpreadBps, grossSpreadBps, optimalInput, venuesConsidered. Requires ?pair=SYM/SYM (e.g. WMATIC/USDC). Errors: 400 bad_pair, 404 not_routable, 502 upstream_read_failed. Ranks venues for one pair; to rank EVERY pair use /scan. Execution at a size is /slippage. Chain-pinned; bare /route = BSC.

## Output

Returns the best buy venue (e.g. QuickSwap), the best sell venue, the cross-exchange spread in basis points, a fee-adjusted gross arbitrage spread, and the optimal trade size for the specified Polygon PoS token pair. Data is sourced live from QuickSwap, SushiSwap, and Uniswap v3 on-chain state.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pair"
     ],
     "properties": {
      "pair": {
       "type": "string",
       "description": "Token pair as SYM/SYM on Polygon PoS (e.g. WMATIC/USDC)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": "2026-07-31T00:00:00.000Z",
  "chainId": 137,
  "network": "polygon"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polygon-dex-best-execution-router-ca1341ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.donnyautomation.com](https://www.zero.xyz/host/x402.donnyautomation.com/llms.txt)
