Spot trading

Swap tokens on EVM chains from your agent's wallet at the best route Kyber or Li.Fi finds, with token lookup, risk warnings and a price-impact guard.

Your agent can swap tokens on the main EVM chains. It asks Kyber and Li.Fi for a route, takes the one that returns the most, and sends the swap from its own wallet. The tokens it buys always come back to that wallet.

Category: Trading · Chains: Base, Ethereum, Arbitrum, Optimism, Polygon, Unichain, Gnosis, Robinhood Chain, MegaETH · Protocol page: thirdfy.com/protocols/trading

Swap

Using Thirdfy, quote a swap of 20 USDC to WETH on Base. Don't swap yet.
Using Thirdfy, swap 20 USDC to WETH on Base.
Using Thirdfy, swap all my DEGEN to USDC on Base.
  • Routes. Kyber and Li.Fi compete where both run. On Gnosis, Robinhood Chain and MegaETH only Li.Fi runs; on Unichain only Kyber. If the best route fails before it is sent, the agent tries the next one. If a send's outcome is unknown, it stops instead of trying again, so the same funds are never swapped twice.
  • Slippage defaults to 1%. Set another with maxSlippage (a percent).
  • Price-impact guard. A swap that would move the price by 5% or more is stopped, and the agent tells you. Run it again with allowHighImpact: true only if you mean it.
  • Amounts. Give an amount in whole tokens, or all/max for the wallet's whole balance.
  • Gas. Thirdfy pays the gas on most of these chains. See Chains.
  • Approvals. The first swap of a token approves the router that runs it.
  • On Gnosis, CoW Swap is a separate venue with gasless orders.

Find the right token

Symbols are easy to fake. When a name isn't exact, the agent doesn't guess: it shows the candidates and asks.

Using Thirdfy, search for the BRETT token on Base.
Using Thirdfy, check token 0x532f27101965dd16442E59d40670FaF5eBB142E4 on Base before I buy it.
  • search_tokens returns up to 10 candidates from GeckoTerminal, Jupiter and CoinMarketCap, each with a risk level (low, medium, high or unknown) and warnings from GMGN, GeckoTerminal and Jupiter.
  • get_token_metadata checks one token: name, decimals, price, liquidity, listings and risk.
  • The agent tells you the warnings before a swap when the risk isn't low. "Unknown" means no source gave a verdict: decide for yourself.

Wallets you control: capped swaps

On a wallet you control with your own signed policy, a swap runs as a capped Uniswap swap: one swap on a listed deep pool, at most $500 each, approving only the exact amount, with slippage up to 3%.

  • Base: USDC, WETH and cbBTC.
  • Robinhood Chain: WETH and USDG.

Other pairs, batches and private swaps are refused on these wallets before anything is signed.

For developers

Catalog provider: trading

ActionKindParams
get_best_trading_quotereadtokenIn, tokenOut, one of amountIn/amountInHuman/amountInRaw, optional slippageTolerance, preferredProvider (kyber, lifi, 0x), chainId
swapwritetokenIn, tokenOut, one amount field, optional maxSlippage (percent, default 1), allowHighImpact, preferredProvider (kyber or lifi), chainId, private, swaps (a batch)
swap_uniswap_cappedwritetokenIn, tokenOut, amountIn, optional slippageBps (default 50, at most 300), confirm: true. Base and Robinhood Chain
search_tokensreadquery, optional chainId, limit (default 5, at most 10)
get_token_metadatareadtokenIdentifier (address or exact symbol), optional chainId
get_trading_opportunitiesreadOptional tokenFilter, minLiquidity, sortBy, chainId. Returns earn vaults and lending markets you can deposit into, with their risk notes

0x answers quotes only: swap runs through Kyber or Li.Fi. With private: true, the swap runs from the agent's shielded balance where Bermuda has a pool (Base Sepolia today; see Private agents). A batch (swaps) runs its swaps at once and reports each one.

MCP
CLI
walletExecute { action: "swap", chainId: 8453, runMode: "agent_wallet", estimatedAmountUsd: 20,
  params: { tokenIn: "USDC", tokenOut: "WETH", amountIn: "20" } }