數據模型與架構參考
Smart Money API數據模型的完整參考。了解所有回應物件的結構與欄位定義,包括鯨魚持倉、資金費率、清算和AI確認分數。
概述
了解API回應結構對於建立整合至關重要。此參考文件記錄了所有數據模型定義、欄位類型、約束條件和範例。所有時間戳記均採用ISO 8601 UTC格式。所有價格和數量均以字串形式返回,以防止浮點數精度損失。
鯨魚持倉物件
代表監控的鯨魚錢包在槓桿交易交易所持有的大額持倉。
| 欄位 | 類型 | 描述 |
|---|---|---|
| id | 字串 | 唯一持倉識別碼 |
| wallet_address | 字串 | 鯨魚錢包地址(0x...格式) |
| exchange | 字串 | bybit、binance或hyperliquid |
| symbol | 字串 | 交易對(BTCUSDT、ETHUSDT等) |
| position_type | 字串 | 多頭或空頭 |
| position_size | 字串 | 基礎資產的持倉大小(例如BTC) |
| entry_price | 字串 | 平均入場價格(USDT) |
| current_price | 字串 | 當前標記價格(USDT) |
| liquidation_price | 字串 | 持倉被清算的價格 |
| pnl | 字串 | 未實現盈虧(USDT) |
| pnl_percent | 數字 | 未實現盈虧百分比 |
| leverage | 整數 | 槓桿倍數(1-20倍) |
| margin_balance | 字串 | 總保證金餘額(USDT) |
| used_margin | 字串 | 已用保證金(USDT) |
| available_margin | 字串 | 可用保證金(USDT) |
| margin_ratio | 數字 | 可用保證金 / 已用保證金比率 |
| funding_rate | 字串 | 當前資金費率(每小時百分比) |
| time_opened | 字串 | 持倉開啟時的ISO 8601時間戳記 |
| last_updated | 字串 | 最後更新的ISO 8601時間戳記 |
鯨魚持倉範例
JSON
{
"id": "pos_1a2b3c4d5e6f7g8h",
"wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
"exchange": "bybit",
"symbol": "BTCUSDT",
"position_type": "long",
"position_size": "15.5",
"entry_price": "42150.00",
"current_price": "43200.50",
"liquidation_price": "34560.00",
"pnl": "16577.75",
"pnl_percent": 3.91,
"leverage": 5,
"margin_balance": "129000.00",
"used_margin": "126225.00",
"available_margin": "2775.00",
"margin_ratio": 0.022,
"funding_rate": "0.00012",
"time_opened": "2026-03-15T08:30:00Z",
"last_updated": "2026-03-21T14:35:45Z"
}
資金費率物件
代表單一交易對和多個交易所在特定時間段內的資金費率。
JSON
{
"timestamp": "2026-03-21T14:00:00Z",
"symbol": "BTCUSDT",
"bybit": {
"rate": "0.000120",
"next_funding_time": "2026-03-21T16:00:00Z",
"next_rate": "0.000145"
},
"binance": {
"rate": "0.000098",
"next_funding_time": "2026-03-21T16:00:00Z",
"next_rate": "0.000115"
},
"hyperliquid": {
"rate": "0.000140",
"next_funding_time": "2026-03-21T16:00:00Z",
"next_rate": "0.000160"
},
"aggregated": {
"mean": "0.000119",
"median": "0.000120",
"highest": "0.000160",
"lowest": "0.000098",
"spread": "0.000062"
}
}
清算物件
代表槓桿持倉的強制清算。
JSON
{
"id": "liq_1a2b3c4d5e6f7g8h",
"exchange": "binance",
"symbol": "BTCUSDT",
"direction": "long",
"position_size": "12.5",
"liquidation_price": "41000.00",
"size_usd": "512500.00",
"timestamp": "2026-03-21T14:35:12Z"
}
未平倉合約物件
代表所有槓桿交易者的總未平倉合約。
JSON
{
"symbol": "BTCUSDT",
"timestamp": "2026-03-21T14:00:00Z",
"total_oi_usd": "12456000000.00",
"long_oi_usd": "7234000000.00",
"short_oi_usd": "5222000000.00",
"long_short_ratio": 1.385,
"oi_change_percent": 2.34,
"exchanges": {
"bybit": {
"long": "3456000000.00",
"short": "2123000000.00"
},
"binance": {
"long": "2567000000.00",
"short": "2234000000.00"
},
"hyperliquid": {
"long": "1211000000.00",
"short": "865000000.00"
}
}
}
確認分數物件
結合鯨魚持倉、鏈上數據、資金費率和市場情緒的AI生成交易信號。
JSON
{
"symbol": "BTCUSDT",
"overall_score": 78,
"signal": "bullish",
"confidence": 0.85,
"timestamp": "2026-03-21T14:30:00Z",
"components": {
"whale_score": 82,
"on_chain_score": 75,
"funding_score": 68,
"liquidation_score": 72,
"sentiment_score": 85
},
"reasoning": "Large whale accumulation with positive on-chain signals",
"next_update": "2026-03-21T14:45:00Z"
}
鏈上指標物件
比特幣和以太坊的鏈上分析。
JSON
{
"asset": "bitcoin",
"timestamp": "2026-03-21T00:00:00Z",
"exchange_flow": {
"inflow_btc": "245.67",
"outflow_btc": "812.34",
"net_flow_btc": "-566.67"
},
"whale_wallets": {
"count": 412,
"total_btc": "1243567.89",
"change_24h": 15.23
},
"mvrv_ratio": 1.42,
"nupl": 0.68,
"realized_price": "42156.50"
}
錯誤回應物件
所有端點的標準錯誤回應格式。
JSON
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "symbol",
"error": "Invalid trading pair format"
}
],
"resolution": "Use format like BTCUSDT"
},
"timestamp": "2026-03-21T14:35:22Z"
}