Tollbooth Swap API

v1.0.3
xyz.tollboothswap.api/tollbooth Checked 2 days ago Published 4 months ago

Token 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.

ParameterTypeDescription
chain *stringChain to swap on
symbol *stringTicker 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.

ParameterTypeDescription
amount *stringSell amount as an integer string in the input token's base units
chain *stringChain to swap on
inputToken *stringToken being sold: mint address (solana) or ERC-20 address (EVM chains)
outputToken *stringToken being bought: mint address (solana) or ERC-20 address (EVM chains)
slippageBpsintegerMax 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.

ParameterTypeDescription
amount *stringSell amount as an integer string in the input token's base units
chain *stringChain to swap on
inputToken *stringToken being sold: mint address (solana) or ERC-20 address (EVM chains)
outputToken *stringToken being bought: mint address (solana) or ERC-20 address (EVM chains)
taker *stringWallet address that will sign and send the swap
safeModebooleanScreen both tokens first; refuses the build if either is critical-risk (honeypot etc.)
slippageBpsintegerMax 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.

ParameterTypeDescription
chain *stringChain to swap on
token *stringToken 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.

ParameterTypeDescription
id *stringReceipt id returned by build_swap