# Trade Desk An intelligence layer between Solana and AI agents. It checks transactions before signing, verifies a transaction matches what the agent meant to do, gives token safety verdicts, explains failures, and converts amounts with real decimals, so agents stop losing money to hallucinated values. ## Pricing - Every tool gives each caller 25 free calls a day (reset daily at 00:00 UTC), then costs $0.01 USDC per call ($0.02 for the three pre-sign and token safety checks), paid per request with x402 on Solana mainnet. Calls that return an error are never charged. - No account or API key. HTTP: an unpaid call to a paid tool returns 402 with a PAYMENT-REQUIRED header; retry with PAYMENT-SIGNATURE. MCP: the unpaid call returns a PaymentRequired tool result; retry with _meta["x402/payment"]. ## How to call - HTTP: POST /api/tools/ with a JSON body of inputs. - MCP: POST /mcp (Streamable HTTP) or /mcp/sse, then tools/call with the tool name. - Docs for every input (what it's looking for, where to get it) and every output field (what it is, how it's worked out): GET /api/tools and GET /api/tools/. - Tools were renamed in October 2026 (preflight_transaction is now check_tx, and so on). Old names and old input names still work. - Ready-to-run live example inputs: GET /api/tools//example. ## Transactions - check_tx (25 free calls a day, then $0.02 USDC per call (x402)): Run on every transaction before signing. Shows what each wallet gains and loses, blocks drainer tricks, and catches failures and expired blockhashes before you pay a fee. Inputs: tx, network?. - tx_matches (25 free calls a day, then $0.02 USDC per call (x402)): Run just before signing a transfer built from a request like "send 5 USDC to X", or a swap built for "swap 1 USDC for JUP". Confirms it moves exactly that token, amount and recipient, nothing more, or that the swap sells exactly that amount and pays the bought token back to you. Catches made-up amounts, wrong decimals, hidden steps and swaps that pay someone else. Inputs: tx, expected.action?, expected.token, expected.amount, expected.to, expected.from?, expected.sell?, expected.buy?, network?. - explain_tx (25 free calls a day, then $0.01 USDC per call (x402)): Run after a transaction lands or fails, to report what happened instead of guessing from logs. For failures it names the failing program and the fix. Inputs: tx_id, network?. - tx_version (25 free calls a day, then $0.01 USDC per call (x402)): Run when code can't find or read a transaction that is on chain, or before relying on code that reads other people's transactions. Inputs: tx_id?, tx?, network?. - build_tx (25 free calls a day, then $0.03 USDC per call (x402)): Run when an agent needs to send SOL or a token, or swap through Jupiter: it returns the unsigned transaction already checked, with ready_to_sign and the reasons. Sign only when ready_to_sign is true. Inputs: action, from, to?, token?, amount, buy?, slippage_bps?, allow_avoid?, network?. ## Tokens - find_token (25 free calls a day, then $0.01 USDC per call (x402)): Run whenever a user names a token ("buy BONK"). Tickers aren't unique; copycats reuse them. Never take an address from memory. Inputs: name. - token_safety (25 free calls a day, then $0.02 USDC per call (x402)): Run before buying, accepting or recommending a token. Answers SAFE, CAUTION or AVOID with exact reasons from chain and market data. Inputs: token, network?. - token_account (25 free calls a day, then $0.01 USDC per call (x402)): Run before sending a token. Tokens go to the recipient's token account, not their wallet, and models can't work that address out. Inputs: wallet, token, network?. - convert (25 free calls a day, then $0.01 USDC per call (x402)): Run before putting any token amount in a transaction. "5 USDC" is 5,000,000 raw units; wrong decimals send 1,000x too much or too little. Inputs: token, amount, to?, network?. ## Wallets - wallet (25 free calls a day, then $0.01 USDC per call (x402)): Run when asked what a wallet holds or is worth. One call instead of balance + tokens + history; spam is left out of the total. Inputs: wallet, network?. - trace (25 free calls a day, then $0.02 USDC per call (x402)): Run when a wallet was drained or money went missing, or before trusting an address someone gave you: follows the money and flags sweeper, pass-through and lookalike-address patterns. Inputs: wallet, how_many?, before?, time_zone?, network?. - balance (25 free calls a day, then $0.01 USDC per call (x402)): Run before sending SOL or paying fees, to confirm the wallet has enough. Never trust a remembered balance. Inputs: wallet, network?. - tokens (25 free calls a day, then $0.01 USDC per call (x402)): Run to learn which tokens a wallet holds and how much. Ranked by USD value; unverified (often spam airdrop) tokens are flagged so you don't report fake holdings. Inputs: wallet, how_many?, include_empty?, network?. - history (25 free calls a day, then $0.01 USDC per call (x402)): Run to see a wallet's recent activity or get a real transaction ID. Never make one up. Inputs: wallet, how_many?, before?, network?. ## Network - fee (25 free calls a day, then $0.01 USDC per call (x402)): Run before setting a priority fee. Gives the price in the unit Compute Budget expects (micro-lamports per compute unit) and the total in SOL, so a unit mix-up never overpays. Inputs: tx?, network?. - blockhash (25 free calls a day, then $0.01 USDC per call (x402)): Run just before building a transaction to sign. Blockhashes expire in about 60-90 seconds; this says how long is left. Inputs: network?. ## Reference - whats_this (25 free calls a day, then $0.01 USDC per call (x402)): Run when unsure what an address is, before sending to it or passing it on. SOL sent to a token or program address can be lost for good. Inputs: address, network?. - why_failed (25 free calls a day, then $0.01 USDC per call (x402)): Run whenever a Solana transaction or dry run fails, before retrying. Retrying blind burns fees. Inputs: error, program?.