prepare_depth_data
Retrieve order book depth data for a trading pair and return cumulative bid/ask volume arrays, spread, and band metrics for visualization.
Instructions
[Depth Chart / Order Book / Visualization] 板の深度チャート描画の第一選択ツール。
getDepth(/depth API)を呼び出し、累積 volume の階段配列 ([price, cumulativeVolume][]) として返す。 Claude.ai の Visualizer 等クライアント側で描画可能な場合はこのツールを優先。 ファイル保存(SVG/PNG)が必要な場合は render_depth_svg を使用。
レスポンス形式: { bids: [[price, cumVolume], ...], asks: [[price, cumVolume], ...], bestBid, bestAsk, mid, spread, spreadPct, totalBidVolume, totalAskVolume, band: {pct, bidVolume, askVolume, ratio}, timestamp, isoTime }
bids は価格降順、asks は価格昇順
band は mid を中心とした ±bandPct 範囲の買い/売り量と比率(ratio = bidVolume / askVolume)
bids / asks / bestBid / bestAsk は取引所の価格のまま。mid と spread は丸め済み(10 万円以上は円の整数、安いペアほど小数の桁が増える)
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": "prepare_depth_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | No | btc_jpy | |
| levels | No | 取得する最大レベル数(片側)。10〜1000 の整数、デフォルト 200 | |
| bandPct | No | mid を中心とした ±range 比率。0.01 = ±1%。デフォルト 0.01 |