# Solana Wallet x402 – Swap Build

> Solana Wallet x402 – Swap Build is a paid API for AI agents from solana-wallet-intel.falcon-sol.workers.dev, paid per call via x402, $0.025/call, status unknown (last checked 2026-11-24).

Builds a signed-ready Solana token swap transaction with integrated pretrade rug/skim risk check before execution

## Facts

- Endpoint: GET https://solana-wallet-intel.falcon-sol.workers.dev/swap/build?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solana-wallet-x402-swap-build-919481c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y_3LCWzIa_JPRQ4Euhh3h

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-wallet-x402-swap-build-919481c1
```

Example prompt: Build me a swap transaction to trade 1,000,000 lamports of SOL (So11111111111111111111111111111111111111112) into USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) from my wallet 7xKpT3... with 50 bps slippage, and run the pretrade rug check before you build it.

## When to prefer this

Use this endpoint when an AI agent needs to both screen a Solana token for rug/skim risk AND build a ready-to-sign swap transaction in a single call. It is the right choice when trading unfamiliar or newly discovered tokens where pretrade safety gating is critical. Prefer it over bare Jupiter or other swap builders when you want integrated risk verdicts, lookalike ticker checks, and the x402 pay-per-call model with no-charge failure guarantees before settlement.

## Known failure modes

- HTTP 402 returned if payment is missing or insufficient (unpaid call to paid route)
- HTTP 400 with no charge if query parameters are invalid or missing after payment
- HTTP 502 returned on upstream failures before settlement, no charge incurred
- pretrade verdict of avoid blocks transaction build unless allowRisky=1 is passed
- unknown pretrade verdict is never treated as safe and may block execution
- invalid mint addresses (not valid base58) cause 400 errors
- amount must be an integer string in smallest units; decimal values cause errors

## How this service works

Three x402 checks an agent runs before it spends: (1) payee_check ($0.0045) before paying an unfamiliar x402 payTo, (2) seller_report ($0.01, on falcon-sol-agents.falcon-sol.workers.dev) to probe a seller's endpoints for uptime, valid 402s and price/payTo drift, (3) pretrade ($0.014) before buying a Solana token (rug/skim risk, xStock status, optional payee check). Each returns ok, caution, do_not_pay/avoid or unknown; unknown is never ok. Failures return 502 before settlement, so you are not charged. Pay-per-call Solana wallet profiles, funding-source clusters, and trending tokens. Agents pay USDC over x402 on Solana, and on Base through the Coinbase CDP facilitator when it is configured. Call free GET /wallet/preview or MCP wallet_preview before paying. Unpaid calls to paid routes return HTTP 402 even when the query is missing or invalid. A signed request with a bad query returns HTTP 400 and is not charged. GET /token/trending costs $0.005 and includes holder concentration, mint and freeze authority, LP lock or burn status, and sniper or bundle share of early supply. Risky results are plain-English risk flags. Successful bodies include cached, stale, and cacheAgeMs.

## Output

Returns a JSON object containing a base64-encoded unsigned Solana swap transaction ready to sign, the quote with expected output amount, a pretrade verdict (ok, caution, avoid, or unknown), platform fee info, and the schema version. If pretrade returns avoid and allowRisky is not set, the transaction may not be built. Failures before settlement return HTTP 502 so the caller is not charged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "inputMint",
      "outputMint",
      "amount",
      "taker"
     ],
     "properties": {
      "taker": {
       "type": "string",
       "description": "Your wallet public key; it pays fees and must sign."
      },
      "amount": {
       "type": "string",
       "description": "Input amount in smallest units (integer, e.g. lamports)."
      },
      "symbol": {
       "type": "string",
       "description": "Optional ticker the output token claims, for the lookalike check."
      },
      "inputMint": {
       "type": "string",
       "description": "Mint you sell (base58). Use So11111111111111111111111111111111111111112 for SOL."
      },
      "allowRisky": {
       "type": "string",
       "description": "Optional. 1 builds the transaction even when pretrade says avoid."
      },
      "outputMint": {
       "type": "string",
       "description": "Mint you buy (base58). This token gets the pretrade check."
      },
      "slippageBps": {
       "type": "string",
       "description": "Optional slippage in bps, 1 to 500 (default 50)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "quote": {
   "out_amount": "1018726"
  },
  "schema": "falcon.swap.v1",
  "status": "built",
  "pretrade": {
   "verdict": "ok"
  },
  "transaction": {
   "data": "<base64>",
   "signed": false,
   "encoding": "base64"
  },
  "platform_fee": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solana-wallet-x402-swap-build-919481c1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from solana-wallet-intel.falcon-sol.workers.dev](https://www.zero.xyz/host/solana-wallet-intel.falcon-sol.workers.dev/llms.txt)
