数据模型与架构参考
Smart Money API数据模型的完整参考文档。了解包括巨鲸持仓、资金费率、强平数据和AI确认分数在内的所有响应对象结构与字段定义。
概述
理解API响应结构对构建集成至关重要。本文档详细记录了所有数据模型定义、字段类型、约束条件及示例。所有时间戳均采用ISO 8601 UTC格式,价格和金额均以字符串形式返回以避免浮点数精度损失。
巨鲸持仓对象
代表杠杆交易平台上被监控巨鲸钱包持有的大额仓位。
| 字段 | 类型 | 说明 |
|---|---|---|
| id | string | 唯一仓位标识符 |
| wallet_address | string | 巨鲸钱包地址(0x...格式) |
| exchange | string | 交易所:bybit、binance或hyperliquid |
| symbol | string | 交易对(如BTCUSDT、ETHUSDT等) |
| position_type | string | 多头或空头 |
| position_size | string | 基础资产数量(如BTC) |
| entry_price | string | USDT计价的平均开仓价 |
| current_price | string | USDT计价的当前标记价格 |
| liquidation_price | string | 触发强平的价格 |
| pnl | string | USDT计价的未实现盈亏 |
| pnl_percent | number | 未实现盈亏百分比 |
| leverage | integer | 杠杆倍数(1-20倍) |
| margin_balance | string | USDT计价的总保证金余额 |
| used_margin | string | USDT计价的已用保证金 |
| available_margin | string | USDT计价的可用保证金 |
| margin_ratio | number | 可用保证金与已用保证金比率 |
| funding_rate | string | 当前资金费率(每小时百分比) |
| time_opened | string | 开仓时间的ISO 8601时间戳 |
| last_updated | string | 最后更新的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确认分数对象
结合巨鲸持仓、链上数据、资金费率与市场情绪的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": "巨鲸持续积累且链上信号积极",
"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": "请求验证失败",
"details": [
{
"field": "symbol",
"error": "交易对格式无效"
}
],
"resolution": "请使用类似BTCUSDT的格式"
},
"timestamp": "2026-03-21T14:35:22Z"
}