# Solana Swap Builder with Pre-Trade Risk Check

> Solana Swap Builder with Pre-Trade Risk Check is a paid API for AI agents from solana-wallet-intel-phi.vercel.app, paid per call via x402, $0.025/call, status unknown (last checked 2026-11-20).

Runs a full pre-trade risk check on a Solana output token and builds an unsigned Jupiter-routed swap transaction with price-impact estimation and optional split-fill plan.

## Facts

- Endpoint: GET https://solana-wallet-intel-phi.vercel.app/swap/build?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solana-swap-builder-with-pre-trade-risk-check-b157885b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dwn8sx1oVrVHu7OVV3V09

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 solana-swap-builder-with-pre-trade-risk-check-b157885b
```

Example prompt: Before I buy, run a pre-trade check on the Solana token at mint address 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU and build me the best unsigned Jupiter swap transaction from USDC, swapping 500 USDC with my wallet 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM as the fee payer.

## When to prefer this

Use this endpoint when your agent needs to both screen a Solana token for safety AND build a ready-to-sign swap transaction in a single call, avoiding the need to call separate risk-check and routing endpoints. Ideal for agentic DeFi workflows where non-custodial, pre-trade-checked swaps are required. Prefer this over raw Jupiter API calls when token risk screening (rug detection, holder concentration, xStock/stablecoin lookalike checks) is important before executing a trade.

## Known failure modes

- Invalid or unrecognized outputMint address returns an error or empty risk data
- No Jupiter route found for the requested token pair returns a routing failure
- Token has extremely low liquidity causing price impact calculation to fail
- Invalid taker wallet address causes transaction construction to fail
- Network congestion or RPC timeouts may delay or fail transaction building
- Token mint flagged as high-risk may return a warning but still build the transaction

## How this service works

Call this when your agent wants to buy or swap a Solana token. One call runs the full pretrade check on outputMint (token risk, holder concentration, stablecoin and xStock lookalikes), then builds the best Jupiter route with a price-impact estimate (and a split-fill chunk plan when impact is over 1%) as an UNSIGNED versioned transaction with your taker wallet as fee payer. Non-custodial: we never hold keys or funds; you sign and send it yourself.

## Output

Returns a token risk report covering sell tax, holder concentration, stablecoin and xStock lookalike flags, plus the optimal Jupiter route with price impact estimate. When price impact exceeds 1%, also includes a split-fill chunk plan. The main deliverable is a fully constructed unsigned versioned Solana transaction ready for the caller to sign and broadcast, with the taker wallet set as fee payer.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solana-swap-builder-with-pre-trade-risk-check-b157885b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from solana-wallet-intel-phi.vercel.app](https://www.zero.xyz/host/solana-wallet-intel-phi.vercel.app/llms.txt)
