# BaseBuilder DeFi Price Impact Calculator

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

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

## Facts

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

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-price-impact-calculator-543c68aa -d '<json body>'
```

Example prompt: What's the price impact if I swap 50,000 USDC to ETH on Uniswap right now — is that trade size going to move the market significantly?

## When to prefer this

Use this endpoint when you need to estimate trade execution costs and market impact before committing a DEX swap, especially for large orders where slippage is a meaningful concern. Prefer this over generic price quote APIs when you specifically need impact percentage and pool-depth analysis rather than just a spot price.

## Known failure modes

- Insufficient liquidity in the pool returns a very high or undefined price impact
- Invalid token pair or unsupported DEX returns a 400 or 404 error
- Extremely large trade sizes may exceed computable limits
- Network or RPC issues on the underlying chain may cause timeouts
- Stale liquidity data may result in inaccurate estimates if pool state changed recently

## How this service works

BaseBuilder Defi API hub - 22 paid endpoints

## Output

Returns the estimated price impact as a percentage for the specified token swap, along with effective price after the trade, slippage metrics, and market depth indicators that help determine whether the trade is viable at that size.

## More

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