Tollbooth Swap API
v1.0.3Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_service_info Get service info
Get Tollbooth service metadata: supported chains, swap fee, x402 toll pricing.
resolve_token Resolve token symbol
Resolve a token ticker symbol (e.g. PEPE, WIF, USDC) to contract addresses on a chain, free. Curated majors return one verified match; others return live DEX matches ranked by liquidity so you can pick the real token over imitations. Use before get_quote when you only know the symbol.
| Parameter | Type | Description |
|---|---|---|
chain * | string | Chain to swap on |
symbol * | string | Ticker symbol to resolve, e.g. USDC, PEPE, WIF |
get_quote Get swap quote
Get a free indicative swap quote (output amount includes Tollbooth's fee). Use before build_swap to decide whether to trade.
| Parameter | Type | Description |
|---|---|---|
amount * | string | Sell amount as an integer string in the input token's base units |
chain * | string | Chain to swap on |
inputToken * | string | Token being sold: mint address (solana) or ERC-20 address (EVM chains) |
outputToken * | string | Token being bought: mint address (solana) or ERC-20 address (EVM chains) |
slippageBps | integer | Max slippage in bps (default 100) |
build_swap Build swap transaction
Build an unsigned swap transaction for the taker wallet to sign and submit. Costs an x402 toll (paid automatically when TOLLBOOTH_PAYER_KEY is set). Returns the transaction, the quote, and a signed receipt.
| Parameter | Type | Description |
|---|---|---|
amount * | string | Sell amount as an integer string in the input token's base units |
chain * | string | Chain to swap on |
inputToken * | string | Token being sold: mint address (solana) or ERC-20 address (EVM chains) |
outputToken * | string | Token being bought: mint address (solana) or ERC-20 address (EVM chains) |
taker * | string | Wallet address that will sign and send the swap |
safeMode | boolean | Screen both tokens first; refuses the build if either is critical-risk (honeypot etc.) |
slippageBps | integer | Max slippage in bps (default 100) |
check_token Check token safety
Token safety screen before trading: honeypot, rug-pull, freeze/mint authority, transfer hooks, sell tax, blacklists. Returns verdict (ok/warn/critical/unknown), a 0-100 risk score, and itemized findings. Costs an x402 toll.
| Parameter | Type | Description |
|---|---|---|
chain * | string | Chain to swap on |
token * | string | Token to screen: mint address (solana) or ERC-20 address (EVM chains) |
get_receipt Get signed receipt
Fetch a signed Tollbooth receipt by id and verify its signature.
| Parameter | Type | Description |
|---|---|---|
id * | string | Receipt id returned by build_swap |