# Who Bought or Sold a Token

> Who Bought or Sold a Token is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.006/call, status unknown (last checked 2026-10-12).

Analyzes DEX swap events for a token over 1–24 hours to return buy/sell counts, USD volumes, net flow, top wallets, and largest trades across 7 major EVM chains.

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/token-flows?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/who-bought-or-sold-a-token-7871fdd8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kvgIJRAnjfbqI0-FgN9Pf

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 who-bought-or-sold-a-token-7871fdd8 -d '<json body>'
```

Example prompt: Before I buy this token, check who's been buying and selling it on Base over the last 6 hours — I need to know the buy/sell ratio, net flow, and whether any single wallet has been dumping. The token address is 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed.

## When to prefer this

Choose this endpoint when you need granular, on-chain buy/sell flow analytics for a specific token on a major EVM chain — especially when evaluating dump risk, whale activity, or net trading pressure before or after a trade. Prefer this over generic price APIs when you need wallet-level detail and DEX-sourced swap event data across Uniswap v2/v3-style and other DEX protocols.

## Known failure modes

- Invalid or unrecognized token contract address returns an error or empty result
- Token has no DEX pools on the specified chain — no swap data available
- Hours parameter outside 1–24 range is rejected or clamped
- Unsupported chain name returns a validation error
- Very new tokens with insufficient swap history may return sparse or zero data
- Payment failure (insufficient USDC balance) blocks the request

## How this service works

Who bought and who sold a token in the last hours: buy and sell count and USD volume, net flow, buy/sell ratio, the top buyer and seller wallets with net USD, and the largest trades, read from the swap events of its biggest DEX pools (Uniswap v2/v3 style, Aerodrome, Velodrome, PancakeSwap, Trader Joe and more) on Base, Ethereum, BSC, Arbitrum, Polygon, Avalanche or Optimism. Flags one-sided selling and a single wallet dumping. For trading agents before or after a buy. Window 1 to 24 hours.

## Output

Returns buy and sell counts, total USD buy/sell volume, net flow (buy minus sell USD), buy/sell ratio, flags for one-sided selling and single-wallet dumping, ranked list of top buyer and seller wallet addresses with their net USD traded, and the largest individual trades observed from DEX swap events.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string",
   "description": "base, ethereum, bsc, arbitrum, polygon, avalanche or optimism. Default base"
  },
  "hours": {
   "type": "number",
   "default": 6,
   "description": "Window in hours, 1 to 24 (shortened on very fast chains)"
  },
  "token": {
   "type": "string",
   "description": "Token contract address"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/who-bought-or-sold-a-token-7871fdd8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
