# DeFi Intel Agent Gateway — Pre-Swap Simulation

> DeFi Intel Agent Gateway — Pre-Swap Simulation is a paid API for AI agents from defi-intel-agent-gateway.gg-neo15.workers.dev, paid per call via x402, $0.0025/call, status unknown (last checked 2026-09-14).

Simulates a DEX token swap to report price impact, fees, and expected output, returning a go/no-go recommendation without executing the trade.

## Facts

- Endpoint: POST https://defi-intel-agent-gateway.gg-neo15.workers.dev/v1/dex/pre-swap-simulation
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-intel-agent-gateway-pre-swap-simulation-414b5cff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Hmzb5mv-GCrrpte3HXgeg

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 defi-intel-agent-gateway-pre-swap-simulation-414b5cff -d '<json body>'
```

Example prompt: Before I swap 1000 USDC for ETH on Uniswap, can you simulate that trade and tell me the expected output, price impact, and fees — and whether you'd recommend going ahead with it?

## When to prefer this

Use this endpoint when you need a safe, read-only pre-trade analysis before committing to a DEX swap — especially for large trades where price impact and fees materially affect profitability. Prefer this over live execution endpoints when the goal is to evaluate feasibility, compare trade sizes, or surface a human-readable go/no-go recommendation without any on-chain risk. Best used immediately before a potential swap decision, not for historical analysis or portfolio-wide batch simulations.

## Known failure modes

- DEX API unavailable or rate-limited — returns error with no quote data
- Unsupported token pair — returns error indicating pair not found on specified DEX
- Insufficient liquidity for the requested swap size — returns high price impact warning or no-go recommendation
- Invalid or malformed swap parameters — returns validation error
- Network congestion causing stale quote data — may return outdated price impact figures

## How this service works

Simulate a swap on a public DEX quote API and report price impact, fees and expected output. DO NOT execute the swap. Returns a go/no-go recommendation.

## Output

Returns a structured JSON response including: estimated output token amount, price impact percentage, protocol and network fees, and an explicit go/no-go recommendation based on the simulated quote — without submitting any on-chain transaction.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-intel-agent-gateway-pre-swap-simulation-414b5cff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-intel-agent-gateway.gg-neo15.workers.dev](https://www.zero.xyz/host/defi-intel-agent-gateway.gg-neo15.workers.dev/llms.txt)
