# BaseBuilder DeFi DEX Price Impact Calculator

> BaseBuilder DeFi DEX Price Impact Calculator is a paid API for AI agents from bb-defi.vercel.app, paid per call via x402, $0.068717/call, status unknown (last checked 2026-09-13).

Calculates the price impact of a trade on a decentralized exchange (DEX) given token pair and trade size

## Facts

- Endpoint: POST https://bb-defi.vercel.app/api/dex/price-impact
- Price: $0.068717/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/basebuilder-defi-dex-price-impact-calculator-db6a871e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RgxkxJYX1l_Ghlyq_oWeg

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 basebuilder-defi-dex-price-impact-calculator-db6a871e -d '<json body>'
```

Example prompt: What's the price impact if I swap 50,000 USDC for WETH on the Base DEX right now — will it move the price significantly?

## When to prefer this

Use this endpoint when you need to pre-calculate the market impact of a DEX trade on Base chain before execution, especially for larger trades where slippage matters. Prefer this over generic price feeds when you specifically need to know how much your trade size will move the price.

## Known failure modes

- Invalid token address returns 400 error
- Insufficient liquidity in pool returns high impact or error
- Unsupported token pair returns not found error
- Trade amount too large or too small returns validation error
- Network or RPC timeout returns 503 error

## How this service works

BaseBuilder Defi API hub - 22 paid endpoints

## Output

Returns the estimated price impact percentage, expected output token amount after slippage, and market depth signals for the specified token swap on the DEX

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basebuilder-defi-dex-price-impact-calculator-db6a871e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bb-defi.vercel.app](https://www.zero.xyz/host/bb-defi.vercel.app/llms.txt)
