# x402 Slippage Recommendation API

> x402 Slippage Recommendation API is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns a recommended maximum slippage tolerance for a planned token swap, based on live price impact analysis plus a safety buffer, with a quality rating.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/exec/slippage
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-slippage-recommendation-api-cdffd491
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s_YQWEShH-ywmSXzptTkK

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 x402-slippage-recommendation-api-cdffd491 -d '<json body>'
```

Example prompt: Before I swap 5000000000 units of 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for 0x4200000000000000000000000000000000000006 on Base, what max slippage should I set to avoid a failed transaction or overpaying?

## When to prefer this

Use this endpoint when an agent is about to execute a token swap and needs to determine a safe slippage tolerance dynamically rather than using a hardcoded value. It is especially valuable for large trades, illiquid pairs, or volatile market conditions where a static 0.5% or 1% slippage setting would cause frequent failures or MEV losses.

## Known failure modes

- Unsupported chain returns an error or defaults to Base
- Invalid or unrecognized token addresses return a lookup failure
- Very illiquid token pairs may return high uncertainty or no result
- amountIn of zero or malformed amount returns a validation error
- Network or oracle unavailability causes a timeout or 503 response

## How this service works

Recommended max slippage for a planned swap based on live price impact plus a buffer, with a rating. Send { chain, tokenIn, tokenOut, amountIn }. Avoid failed txns and overpaying on slippage.

## Output

Returns a recommended maximum slippage percentage for the planned swap, derived from live price impact calculation plus a safety buffer, along with a rating (e.g. low/medium/high risk) to help the agent decide whether to proceed and what slippage cap to pass to the DEX router.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "amountIn",
  "tokenIn",
  "tokenOut"
 ],
 "properties": {
  "chain": {
   "type": "string",
   "description": "Chain, default base"
  },
  "tokenIn": {
   "type": "string",
   "description": "0x token to sell"
  },
  "amountIn": {
   "type": "string",
   "description": "Amount in smallest units"
  },
  "tokenOut": {
   "type": "string",
   "description": "0x token to buy"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-slippage-recommendation-api-cdffd491/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
