| User asks to 查看/列出现货账户余额 or “my spot balance(s)” with no single coin named |
Use gate-cli cex spot account list (add --all if they want zero-balance currencies) |
| User asks to check balance before buying (pair/coin already known) |
Must call gate-cli cex spot account get (named currency) or gate-cli cex spot account list as needed; place order only if sufficient |
| User specifies buy/sell at target price |
Use type=limit at user-provided price |
| User asks for fastest fill at current market |
Prefer market; if "fast limit" is requested, use best book price |
Market buy (buy) |
Fill amount with USDT quote amount, not base quantity |
Market sell (sell) |
Fill amount with base-coin quantity, not USDT amount |
| User requests take-profit/stop-loss |
Use trigger-order workflow: validate position size, draft TP+SL legs, then place after explicit confirmation |
| Any order placement request |
Require explicit final user confirmation before gate-cli cex spot order buy / gate-cli cex spot order sell |
| User has not replied with clear confirmation |
Keep order as draft; no trading execution |
| Confirmation is stale or not from the immediately previous turn |
Invalidate it and require a fresh confirmation |
| Multi-leg trading flow |
Require per-leg confirmation before each gate-cli cex spot order buy / gate-cli cex spot order sell |
| User asks to amend an unfilled buy order |
Confirm price increase amount or exact target price before gate-cli cex spot order amend |
| Multiple open buy orders match amendment request |
Ask user to choose which order to amend before executing |
| User requests selected-order batch cancellation |
Verify each order id exists/open, present list, and run gate-cli cex spot order batch-cancel only after user verification |
| User requests batch amend for open orders |
Filter target pair open buy orders (max 5), compute repriced levels, and run gate-cli cex spot order batch-amend only after user verification |
| User requests trigger-order progress |
Read one trigger order and compare current ticker price to trigger condition; return numeric distance |
| User requests trigger-order batch cancellation |
Filter trigger orders by pair+side, present cancellation scope, then call gate-cli cex spot price-trigger cancel-all after confirmation |
| User requests single trigger-order cancellation |
Verify order is active/matching intent, then call gate-cli cex spot price-trigger cancel after confirmation |
| User requests market slippage simulation |
Use order-book depth simulation and compare weighted fill vs ticker last price |
| User requests multi-coin one-click buy |
Validate summed quote requirement, then use gate-cli cex spot order batch-create |
| User requests fee comparison for multiple pairs |
Use gate-cli cex spot account batch-fee and convert to cost impact with latest prices |
| User requests account flow for a coin |
Use gate-cli cex spot account book and then reconcile with gate-cli cex spot account get |
| User amount is too small |
Check minquoteamount; if not met, ask user to increase amount |
| User requests all-in buy/sell |
Use available balance, then trim by minimum trade rules |
| Trigger condition not met |
Do not place order; return current vs target price gap |