# Flow — Best-Execution Swap Quotes for AI Agents

> Flow — Best-Execution Swap Quotes for AI Agents is a paid API for AI agents from flow-kg4x.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Returns best-execution crypto swap quotes on Base by comparing Uniswap V3 and Aerodrome DEXes in ~600ms

## Facts

- Endpoint: GET https://flow-kg4x.vercel.app/api/smart-wallets?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/flow-best-execution-swap-quotes-for-ai-agents-af10e900
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QNFCNR4kWtXGv8RcRJf0H

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 flow-best-execution-swap-quotes-for-ai-agents-af10e900
```

Example prompt: Before I swap $2,500 worth of USDC to WETH on Base, can you check Flow to get the best-execution quote by comparing Uniswap V3 and Aerodrome so I know which DEX gives me the best rate?

## When to prefer this

Use this endpoint when an AI agent is about to execute a token swap on Base and needs a fast (~600ms), no-API-key best-execution quote that aggregates across both Uniswap V3 and Aerodrome. Prefer this over calling individual DEX APIs directly when you want a single ranked comparison, social velocity signals, and a leaderboard context without managing multiple integrations.

## Known failure modes

- Payment not included or rejected — 402 response requiring 0.01 USDC x402 payment
- DEX data unavailable or stale — signals marked with stale:true flag
- Network latency spike causing quote to exceed 600ms freshness window
- Invalid or missing required input parameters returning 400 error
- Base network congestion causing quote inaccuracies

## How this service works

Use when an agent needs to know what profitable Base wallets are buying right now, or where social attention is spiking, before taking a position. Flow smart-wallet tracker: leaderboard of Base wallets ranked by early buys on pumping tokens, a real-time buy-signal feed (timestamp + block number per signal, stale flags past 10 min), a paper-trading record that copy-trades top wallets, and a social-velocity overlay showing where attention is spiking.

## Output

Returns a JSON object containing buy/sell signals with token symbols and USD amounts, a ranked leaderboard of winning smart wallets, a paper trading record with total PnL and trade count, and social velocity spikes with hot-score ratings for Base tokens.

## 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": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "signals": [
   {
    "side": "buy",
    "stale": false,
    "symbol": "WETH",
    "amountUsd": 2500
   }
  ],
  "leaderboard": [
   {
    "rank": 1,
    "wins": 7,
    "wallet": "0x…"
   }
  ],
  "paperRecord": {
   "totalPnlUsd": 34.5,
   "totalTrades": 12
  },
  "socialVelocity": {
   "spikes": [
    {
     "level": "hot",
     "score": 82,
     "token": "0x…"
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/flow-best-execution-swap-quotes-for-ai-agents-af10e900/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flow-kg4x.vercel.app](https://www.zero.xyz/host/flow-kg4x.vercel.app/llms.txt)
