# Quote token swaps and manage limit orders with an AI agent

Compare EVM and Solana swap routes, inspect minimum output and fee collection, then follow a wallet-signed swap or a resting limit order.

Guide: https://www.bitpont.com/help/ai-agents/swaps-and-limit-orders/

## 1. Resolve both tokens on the chosen chain

Find the exact mint or token address and its decimals. Pass integer strings for token base units to the swap quote endpoints. The example prices 0.01 SOL against USDC with a slippage limit of 50 basis points. Inspect the returned output and fee mint before accepting the quote.

## 2. Carry the quote into review

On Solana, use the quoted minimum output when preparing the wallet transaction. On EVM, use the selected route and unexpired quote ID on a route that offers preparation. Compare the unsigned transaction with your original wallet, token pair, maximum sell amount, minimum received and fee. Confirm a required allowance before preparing the swap again.

## 3. Track the order in its venue

A market swap and a resting limit order have different outcomes. For a limit order, review the making amount, taking amount and expiry. CoW orders have a venue UID and signed cancellation flow. Keep the provider order ID and recheck the remaining quantity and fills after a cancellation request.

## 4. Send the authorized transaction

Use the supported action with executionPrepare in the same workspace. Review the returned signing payload. On the wallet host use bitpont_walletExecute, or sign locally and send executionSubmit. Save the executionId to follow settlement and recover after a timeout.

## Request a walletless SOL to USDC quote

```
curl -fsS "https://www.bitpont.com/api/v1/agent/swap/solana/quote" \
  -H 'Content-Type: application/json' \
  -d '{"inputMint":"So11111111111111111111111111111111111111112","outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"10000000","slippageBps":50}'
```

## Tools

- `findAssets`
- `solQuote`
- `solSwapTransaction`
- `quoteEvmSwap`
- `prepareSwap`
- `limitOrderPrepare`
- `viewActiveLimitOrders`

## Further reading

- [Swap quote and fee fields](<https://www.bitpont.com/developers/quotes/>)
- [CoW orders and cancellation](<https://www.bitpont.com/help/cow-orders/>)
- [Execute a DeFi trade from an agent wallet](<https://www.bitpont.com/help/ai-agents/execute-with-agent-wallet/>)
- [Find a trading pair and build an exact swap or bridge quote request](<https://www.bitpont.com/help/ai-agents/find-swap-and-bridge-quotes/>)
- [Verify the tokens and fees from an agent swap](<https://www.bitpont.com/help/ai-agents/verified-swap-receipts/>)
- [Resume a swap, vault or bridge task from Portfolio or MCP](<https://www.bitpont.com/help/ai-agents/resumable-portfolio-tasks/>)
