Trading
Execute on-chain trades directly through your D0 Bot. Swap tokens, create limit orders, and transfer funds — all with a safe two-step workflow that shows you a preview before executing.
What You Can Do
| You Say | What Happens |
|---|---|
| "Swap 10 USDC to SOL" | Get a quote, then confirm to execute the swap |
| "Create a limit order to sell 1 SOL at $150" | Set a limit order that fills when the target price is reached |
| "Transfer 5 SOL to <address>" | Send tokens to another wallet |
| "Show my orders" | List all your active and pending orders |
| "Check my balance" | See your wallet tokens and their values |
How Trading Works
The Two-Step Workflow
Every trade follows a safe preview-then-execute pattern:
Step 1 — Query (Preview): Your bot shows you the quote without executing anything.
Step 2 — Execute (Confirm): You confirm, and the transaction is submitted to the blockchain.
This prevents accidental trades and lets you verify prices before committing funds.
Swap Tokens
You: "Swap 100 USDC to SOL"
Bot: "Quote: You'll receive ~0.70 SOL for 100 USDC.
- Price: $142.35 per SOL
- Price impact: 0.01%
- Route: USDC → SOL via Jupiter
Shall I execute?"
You: "Yes"
Bot: "Transaction submitted! TX: 5abc...xyz. You received 0.6998 SOL."
Limit Orders
You: "Create a limit order to buy 1 SOL at $130"
Bot: "Limit order preview:
- Buy 1 SOL when price reaches $130
- You'll spend ~130 USDC
Execute?"
You: "Yes"
Bot: "Limit order created! Order ID: 12345. The order will fill automatically when SOL reaches $130."
Manage Orders
You: "Show my orders"
Bot: "Your active orders:
ID Type Pair Amount Target Status 12345 Limit Buy SOL/USDC 1 SOL $130 Active 12346 Limit Sell JUP/USDC 500 JUP $1.50 Active
Transfer Tokens
You: "Send 5 SOL to <wallet address>"
Bot: "Transfer preview:
- Sending: 5 SOL ($711)
- To: <wallet address>
Execute?"
You: "Confirm"
Bot: "Transfer complete! TX: 8def...uvw. 5 SOL sent."
Data Sources
Swap trades are routed through Jupiter, Solana's leading DEX aggregator, which automatically finds the best price across all Solana DEXs. Limit orders are managed through the D0 backend.
Tips
- Always check the quote first — The preview shows you exact amounts, price impact, and fees before you commit
- Use limit orders for better entries — Instead of buying at market price, set a limit order at your target and let it fill automatically
- Watch price impact — For large trades, check the price impact percentage. If it's high, consider splitting into smaller trades
- Check your balance before trading — Make sure you have enough tokens for the trade plus gas fees (SOL for transaction fees)
