# Delx Commerce — AMM Price Impact Calculator (BPS)

> Delx Commerce — AMM Price Impact Calculator (BPS) is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the price impact in basis points for a trade on an Automated Market Maker (AMM), given input amount, reserves, and fee.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/amm-price-impact-bps?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-amm-price-impact-calculator-bps-5402e96c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0S1o9b3EbMHDyLua208Az

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 delx-commerce-amm-price-impact-calculator-bps-5402e96c -d '<json body>'
```

Example prompt: What's the price impact in basis points if I swap 50 tokens into a pool with 10000 reserve_in and 10000 reserve_out, with a 30 bps fee?

## When to prefer this

Use this endpoint when you need a fast, verifiable, pay-per-use computation of AMM price impact without setting up your own on-chain simulation or running a full DEX SDK. Ideal for AI agents that need to pre-screen trades for excessive slippage before executing, or analyze pool liquidity depth on the fly. Prefer this over custom implementations when you want deterministic, formula-based results with no signup overhead and USDC micropayment billing via x402.

## Known failure modes

- Missing required fields (amount_in, reserve_in, reserve_out, fee_bps) returns validation error
- Zero or negative reserve values may cause division-by-zero or undefined behavior
- Payment not provided or insufficient USDC results in 402 Payment Required response
- Extremely large input amounts relative to reserves may produce unrealistically high impact values

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns the computed amount_out (tokens received after fees) and impact_bps (price impact expressed in basis points, e.g. 530 bps = 5.3% slippage), along with the schema identifier and the input amount for verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fee_bps": {
   "type": "integer",
   "description": "Input field: fee bps."
  },
  "amount_in": {
   "type": "integer",
   "description": "Input field: amount in."
  },
  "reserve_in": {
   "type": "integer",
   "description": "Input field: reserve in."
  },
  "reserve_out": {
   "type": "integer",
   "description": "Input field: reserve out."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-amm-price-impact-bps/v1",
  "amount_in": 50,
  "amount_out": 47.48297375815593,
  "impact_bps": 530.0902708124378
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-amm-price-impact-calculator-bps-5402e96c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
