# DEX Swap History & Buy/Sell Flow for Base Tokens

> DEX Swap History & Buy/Sell Flow for Base Tokens is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns recent DEX swap history and buy/sell flow summary for a token or pool on Base, decoded from Aerodrome/Uniswap-V3 on-chain event logs.

## Facts

- Endpoint: GET https://api.agentstools.dev/dex/swaps
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dex-swap-history-buy-sell-flow-for-base-tokens-09b18eca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-iOmRZiBsdaz-Hc77_AdR

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 dex-swap-history-buy-sell-flow-for-base-tokens-09b18eca
```

Example prompt: Show me the buy/sell flow for AERO on Base over the last 30 minutes — I want per-swap details plus a summary of total volume, net flow, and the biggest trades.

## When to prefer this

Choose this endpoint when you need on-chain DEX swap activity specifically on the Base network, decoded from Aerodrome or Uniswap V3 logs, including per-trade granularity (trader, side, amount, price) plus an aggregated buy/sell flow summary. Prefer this over generic price feeds when you need actual trading flow, net buying/selling pressure, or whale trade detection on Base.

## Known failure modes

- Unknown token symbol returns empty results or an error if the token has no tracked pools
- Pool address not found on Base returns an empty swap list
- Window exceeds the ~6h maximum, resulting in a capped or error response
- No swaps in the requested window returns an empty list with zeroed summary
- Invalid pool or token address format returns a 400-level error

## How this service works

Recent DEX swap history + buy/sell flow for a token or pool on Base: per-swap trader/side/amount/price plus a summary (count, buy/sell volume, net flow, largest swaps), decoded by us from public Aerodrome/Uniswap-V3 Swap event logs.

## Output

Returns a list of individual swaps (trader address, buy/sell side, amount, price) plus an aggregate summary including total swap count, buy volume, sell volume, net flow, and the largest swaps — all decoded from Aerodrome/Uniswap-V3 Swap event logs on Base within the requested time window.

## 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",
     "required": [],
     "properties": {
      "pool": {
       "type": "string",
       "description": "Explicit pool address (0x..) instead of a token symbol"
      },
      "limit": {
       "type": "integer",
       "maximum": 500,
       "minimum": 1,
       "description": "Max swaps to return (default/cap 500; summary covers the full window)"
      },
      "token": {
       "type": "string",
       "description": "Base token symbol (e.g. WETH/AERO); aggregates all its tracked pools"
      },
      "window": {
       "type": "string",
       "description": "Look-back window, e.g. 30m / 1h / 6h (default 1h, max ~6h)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dex-swap-history-buy-sell-flow-for-base-tokens-09b18eca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
