Compare execution routes
compare_executionRead-only best-execution comparison for one order: ranks the user's CEX books, on-chain perps books (with funding over the hold), DEX aggregator quotes (net of gas) and tokenized-stock routes by all-in one-way cost in bps. Unknown costs stay null and rank last; best is the cheapest route the user can use now (connected), bestSpot the cheapest that delivers the asset itself (not a perp), runnerUp + savingBps name the next alternative, cheaperIfConnected a cheaper venue they have not connected. Call it before proposing an order of $250 or more, or when the user asks for the best/cheapest venue or rate; then propose ONE card on best. Fees are base tier (the user's VIP tier may be lower).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"side": "<side>",
"base": "<base>",
"size_usd": "<size_usd>"
},
"name": "compare_execution"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Base asset symbol, e.g. ETH, BTC, SOL, or a tokenized stock id like TSLA. | |
| side | Yes | buy = acquire the base asset (or go long), sell = dispose of it (or go short). | |
| scope | No | Route kinds to compare; omit for all. | |
| chains | No | Chains for aggregator quotes (e.g. arbitrum, base, solana); omit for a default per asset. | |
| size_usd | Yes | Order size in USD notional (> 0). | |
| exchanges | No | CEX slugs to check; omit for the user's connections plus the largest public books. | |
| hold_days | No | Days a perp would be held, for the funding leg (default 1). | |
| connected_only | No | true = only venues the user can trade now. Default false (public venues are ranked too, best stays connected-only). |