prepare_depth_data
Fetches cumulative order book depth data for a cryptocurrency pair, returning bid and ask price-volume stair arrays, best prices, spread, and band statistics. Designed for depth chart 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)
JPY ペアの価格は整数に丸め済み
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | No | btc_jpy | |
| levels | No | 取得する最大レベル数(片側)。10〜1000 の整数、デフォルト 200 | |
| bandPct | No | mid を中心とした ±range 比率。0.01 = ±1%。デフォルト 0.01 |