get_execution_cost
Calculate per-exchange execution costs for crypto orders, including spread, slippage, and depth-walk impact, to compare trading venues by real cost.
Instructions
当用户询问买卖点差、滑点、订单簿深度、大单冲击成本、市价单实际成交成本、各所吃单执行成本对比时使用。Use when the user asks about bid-ask spread, slippage, order-book depth, market impact, or the real execution cost of a marketable order across exchanges. Returns per-exchange one-way execution cost in bps and USD for a specific order size (default $10,000): full spread, crossing cost (half spread), depth-walk slippage beyond the top level, total one-way cost, levels consumed, and fill status. spreadMode=bundled (default) uses offline typical-spread baselines by venue and pair class (majors/large-cap/mid-alt) instantly; spreadMode=live fetches the real top-100 order book per venue independently via ccxt and VWAP-walks it — failures fall back to bundled baselines (listed in failures), shallow books keep the measured cost with a warning. Spot requests use the spot market (e.g. kucoin rather than kucoinfutures). Requires country for compliance filtering unless exchanges are given explicitly.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_execution_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | No | 交易对,默认 BTC/USDT;支持 ETH/USDT、SOL-USDT 等。山寨币点差按内置档位放大(mid-alt ×3),live 模式按真实订单簿 | |
| side | No | 方向,默认 buy;buy 吃卖盘、sell 吃买盘,live 时两侧深度可能不同 | |
| country | No | ISO 3166-1 alpha-2 国家代码;传入后按合规可用性过滤交易所(EEA 居民查 USDT 报价对会附稳定币区域可用性警告) | |
| purpose | No | 市场类型,默认 futures(永续);spot 自动解析各所现货市场与符号 | |
| language | No | 输出语言:en=英文(默认),zh=中文。仅影响 advice/warnings/tradeoffs/reasons 等叙述性文字,数值、字段名与错误码不受影响 | |
| exchanges | No | 只查询指定交易所(如 ['binance','kraken']);默认返回全部 9 家(合约比较不含 Coinbase) | |
| spreadMode | No | bundled=内置典型点差基准(默认,秒回、零滑点);live=实时订单簿前100档 VWAP 行走,含真实滑点,单所失败回退 bundled 并记入 failures | |
| tradeSizeUsd | No | 单笔市价单规模(USD),默认 10000($1万)。滑点对规模高度敏感,大单务必传真实值,如 50000、250000 |