GET部分可用PARTIAL
依訂單簿深度排行的幣種
依單一價格區間內的彙總訂單簿深度(買盤 + 賣盤)排行的幣種,附納入的合約數與最窄的買賣價差。
GET
/api/sd/liquidity/rank請求
查詢參數
| 名稱 | 型別 | 必填 | 預設值 | 可用值 | 說明 |
|---|---|---|---|---|---|
| market | string | 選填 | perp | perp, spot | 市場類型。永續合約與現貨的訂單簿絕不相加。 |
| band | string | 選填 | 1 | 0.5, 1, 2 | 距中間價的百分比距離。 |
| limit | integer | 選填 | 50 | ≥ 1 · ≤ 200 | 列數。 |
請求範例
curl -s "https://www.coinboss.com/api/sd/liquidity/rank"回應欄位
欄位表由真實回應產生,因此列出的正是端點實際回傳的內容。路徑中的 a[] 代表陣列元素,{*} 代表以動態名稱(例如幣種或交易所)為鍵的物件。
| 欄位 | 型別 | 單位 | 說明 |
|---|---|---|---|
| success | boolean | — | 請求成功時為 true。失敗時回應內容為 `{ success: false, code, error, request_id }`。 |
| schema | string | — | 此回應的結構描述 ID。只有在既有欄位的意義或型別改變時才會變更。 |
| now | number | ms | 建立回應時的伺服器時間。 |
| market | string | — | `perp` 或 `spot`。 |
| band_pct | number | % | 所選的價格區間:距中間價的距離。 |
| limit | number | — | 實際套用的列數上限。 |
| total_coins | number | — | 至少有一筆訂單簿資料列的幣種。 |
| rows | array | — | 每個幣種一列。 |
| rows[] | object | — | 每個幣種一列。 |
| rows[].coin | string | — | 幣種代號(大寫)。 |
| rows[].bid_depth_usd | number | USD | 中間價與價格區間下緣之間的買盤掛單名義價值。`complete` 為 false 時為下限。 |
| rows[].ask_depth_usd | number | USD | 中間價與價格區間上緣之間的賣盤掛單名義價值。`complete` 為 false 時為下限。 |
| rows[].total_depth_usd | number | USD | 該價格區間的買盤深度 + 賣盤深度,僅作為排名依據。 |
| rows[].n_included | number | — | 計入深度加總的資料列數:須為新鮮且在該價格區間內完整。請與深度值一併解讀。 |
| rows[].n_fresh | number | — | 新鮮的資料列數。 |
| rows[].n_rows | number | — | 找到的資料列數,包含過期者。 |
| rows[].mid_median | number | USD | 新鮮資料列中間價的中位數。 |
| rows[].spread_bps_min | number | bp | 新鮮資料列中最窄的買賣價差。 |
| rows[].included_exchanges | array | — | 新鮮資料已被納入的來源。 |
| rows[].included_exchanges[] | string | — | 新鮮資料已被納入的來源。 |
| rows[].uses_aggregated_buckets | boolean | — | 有任一納入的資料列使用了價格合併區間時為 true,此時加總值為下限。 |
| rows[].rank | number | — | 排名名次;該列沒有可供排名的數值時為 `null`。 |
| coverage | object | — | 數字中納入與未納入的內容。與其他來源比較合計值之前,請先比對這一項。 |
| coverage.included_exchanges | array | — | 新鮮資料已被納入的來源。 |
| coverage.included_exchanges[] | string | — | 新鮮資料已被納入的來源。 |
| coverage.unavailable | array | — | 無法納入的來源,各附原因。它們絕不會以 0 計入。 在產生此表所用的樣本中為空 |
| coverage.stale_excluded | array | — | 因最近一次更新超出新鮮視窗而被排除的資料列。 |
| coverage.stale_excluded[] | object | — | 因最近一次更新超出新鮮視窗而被排除的資料列。 |
| coverage.stale_excluded[].exchange | string | — | 交易所 ID(小寫)。 |
| coverage.stale_excluded[].age_s | number | s | 距收到該資料列的秒數。 |
| coverage.n_fresh_rows | number | — | 所有幣種的新鮮資料列數。 |
| coverage.n_stale_rows | number | — | 所有幣種的過期資料列數。 |
| coverage.n_incomplete_rows | number | — | 快照未涵蓋到價格區間邊緣的新鮮資料列。 |
| method | object | — | 此回應所用公式的純文字說明,每個欄位一項。 |
| method.bid_depth_usd | string | — | `bid_depth_usd` 的公式說明,純文字。 |
| method.ask_depth_usd | string | — | `ask_depth_usd` 的公式說明,純文字。 |
| method.complete | string | — | `complete` 的公式說明,純文字。 |
| method.aggregate | string | — | `aggregate` 的公式說明,純文字。 |
| method.fresh | string | — | `fresh` 的公式說明,純文字。 |
| method.rank | string | — | `rank` 的公式說明,純文字。 |
| meta | object | — | 此回應的資料歷程與新鮮度。 |
| meta.schema | string | — | 此回應的結構描述 ID。只有在既有欄位的意義或型別改變時才會變更。 |
| meta.source | array | — | 資料採集所用的上游公開端點。 |
| meta.source[] | object | — | 資料採集所用的上游公開端點。 |
| meta.source[].exchange | string | — | 交易所 ID(小寫)。 |
| meta.source[].market | string | — | `perp` 或 `spot`。 |
| meta.source[].endpoint | string | — | 採集器讀取的來源公開端點(僅供說明資料歷程;用戶端不會直接呼叫它)。 |
| meta.observed_at | number | ms | 來源為該資料提供的時間戳記。 |
| meta.received_at | number | ms | CoinBoss 採集器收到資料的時間。 |
| meta.fetched_at | number | ms | 此回應組裝完成的時間。 |
| meta.window | string | — | 數字涵蓋的時間視窗。 |
| meta.quality | string | — | FRESH、PARTIAL、STALE、BROKEN 或 UNAVAILABLE,依資料時間戳記與覆蓋範圍判定。 |
| meta.is_stale | boolean | — | 資料已超出其新鮮視窗時為 true。 |
| meta.cache_ttl_s | number | s | 此回應的快取存活時間。 |
| meta.fallback | string | — | 採集器或來源發生故障時,此端點回傳的內容。 |
| meta.collector_heartbeat_age_s | number | s | 距採集器上次回報仍在運作的秒數。 |
產生於 2026-11-11 23:00 UTC,依據 3 筆真實回應。
回應範例
/api/sd/liquidity/rank · 真實回應,擷取於 2026-11-13 04:02:46 UTC。 較長的陣列與對應表已截短顯示:rows 原有 50 個項目; meta.source 原有 23 個項目; coverage.stale_excluded 原有 23 個項目; rows[].included_exchanges 原有 19 個項目; coverage.included_exchanges 原有 23 個項目。
- "success"true
- "schema""coinboss.sd.liquidity/1"
- "now"1794542566023
- "market""perp"
- "band_pct"1
- "limit"50
- "total_coins"89
- "rows"
- "coverage"
- "included_exchanges"
- "unavailable"
- "stale_excluded"
- "n_fresh_rows"1481
- "n_stale_rows"82
- "n_incomplete_rows"8
- "method"
- "bid_depth_usd""sum of resting bid notional with price >= mid * (1 - band%), in USD; notional = price * size * contract_value (inverse contracts: size * contract_value); USDT /…"
- "ask_depth_usd""sum of resting ask notional with price <= mid * (1 + band%), in USD; same notional rule as bid_depth_usd"
- "complete""true when BOTH sides of the snapshot reach the band edge (reach_pct >= band) or the whole side of the book was returned; when false the depth values are lower b…"
- "aggregate""per market and band: sum over rows that are fresh AND complete for that band; n_included / n_fresh is the denominator; lower_bound_* additionally adds the incom…"
- "fresh""a row is fresh when now - received_at <= max(3 * period_s, 300s); stale rows are listed in coverage.stale_excluded; rows older than 24h are dropped"
- "rank""coins ordered by bid_depth_usd + ask_depth_usd of the chosen market and band, aggregated as in aggregate; coins with no fresh complete row carry nulls and sort …"
- "meta"
- "schema""coinboss.sd.liquidity/1"
- "source"
- "observed_at"1794542565862
- "received_at"1794542565977
- "fetched_at"1794542566023
- "window""latest"
- "quality""PARTIAL"
- "is_stale"false
- "cache_ttl_s"30
- "fallback""stale rows (older than max(3 * period_s, 300s)) are left out; coins whose rows are all stale or incomplete keep their place in the list with null depth"
- "collector_heartbeat_age_s"4
已驗證的樣本
除了上方的範例之外,探針還會以下列參數呼叫此端點,並在每次呼叫時檢查結構描述。
| 參數 | HTTP | 延遲 | 結果 |
|---|---|---|---|
| market=spot | 200 | 5 ms | 通過 PARTIAL |
| band=0.5&limit=10 | 200 | 7 ms | 通過 PARTIAL |
| limit=0 | 400 | 2 ms | 通過 回傳預期的錯誤 |
檢查於 2026-11-13 03:58:06 UTC
詳細資訊
- 身分驗證
- 無。公開端點。
- 速率限制
- 每個 IP 每分鐘 1200 次請求
- 伺服器快取
- 30s
- 邊緣微快取
- 10s
- 更新頻率
- 與 `/api/sd/liquidity` 相同的採集週期。
- 時間視窗
- 每個合約的最新快照。
- 資料來源
- 24 家交易所(永續合約與現貨市場)的公開 REST 訂單簿快照,由 CoinBoss 採集並儲存(sd_book_latest、sd_book_hist)。深度與滑點由 CoinBoss 依原始價格檔位自行計算。
- 交易所覆蓋範圍
- 24 家交易所,38 條「交易所 × 市場」通道。若公開快照未能涵蓋距中間價 ±0.5 / 1 / 2 % 的範圍(受交易所的檔位數上限所限),該價格區間會標記為 `complete: false`,其數值為下限,且不計入彙總值;`n_included` / `n_fresh` 提供分母,`excluded_incomplete` 則列出被排除的項目。
- 分頁
- 不分頁;`limit` 限制回傳的列數(最大 200)。
- 排序
- `total_depth_usd` 降冪;沒有任何完整且新鮮資料列的幣種排在最後,其 `rank: null`。
- 單位
- Depth in USD notional, bid and ask side reported separately and never added. Spread and slippage in basis points (1 bp = 0.01 %). USDT / USDC / USD quotes are counted 1:1 as USD.
- 時間戳記
- Unix epoch 毫秒(UTC),除非欄位說明另有註明
- 回應格式
- json
- 穩定性
- 穩定版
- 上線時間
- 2026-11-11
即時狀態
部分可用檢查於 2026-11-13 04:02:46 UTCHTTP 2009 ms結構描述相符最新資料點距今 0s
端點回報的資料品質為 PARTIAL
近 30 天可用率
408 次檢查中有 100% 通過
錯誤
所有端點的失敗回應都採用同一種結構。完整清單請見錯誤頁面。 錯誤與速率限制 →
| 錯誤碼 | HTTP | 意義 | 處理方式 |
|---|---|---|---|
| INVALID_PARAM | 400 | 缺少必填參數,或某個值不被接受。已知時,`param` 會指出是哪個參數。 | 請勿原樣重試;請修正請求。 |
| UNAUTHORIZED | 401 | 已送出 `CB-API-KEY` 標頭,但金鑰未知或已撤銷。公開資料不需要金鑰——請移除該標頭或改用有效的金鑰。 | 請勿原樣重試。 |
| FORBIDDEN | 403 | 此路由不屬於公開 API(內部或僅限帳戶使用)。 | 請勿重試。 |
| NOT_FOUND | 404 | 未知的路由,或所請求的幣種/交易所/基金不存在。 | 請勿重試;請對照目錄檢查路徑與識別碼。 |
| RATE_LIMITED | 429 | 請求數超過每分鐘上限。`Retry-After` 會指出需等待的秒數。 | 等待 `Retry-After` 指定的時間後,再以退避策略重試。 |
| INTERNAL | 500 | 非預期的伺服器錯誤。訊息刻意保持籠統;回報時請附上 `request_id`。 | 幾秒後重試一次;若問題持續,請附上請求 ID 回報。 |
| UPSTREAM_FAILED | 503 | 此端點背後的資料來源未及時回應。不會以過期或替代的數字代替回傳。 | 以退避策略重試;並查看狀態頁面。 |
| UNAVAILABLE | 501 / 503 | 資料集暫時尚未就緒(快取預熱中),或此端點目前尚無合法的公開來源。 | 稍後重試;目錄會標示出設計上即無法使用的端點。 |
| REQUEST_FAILED | 200 | 部分舊版端點會以 HTTP 200 回應但帶有 `success: false`。請務必檢查 `success`,而不只是 HTTP 狀態碼。 | 視訊息而定;請當作失敗的請求處理。 |
試用
GET
/api/sd/liquidity/rank部分可用參數
string · 預設 perp — Market type. Perpetual and spot books are never added together.
string · 預設 1 — Distance from mid price in percent.
integer · 預設 50 · 最小 1 · 最大 200 — Number of rows.
請求 URL
https://www.coinboss.com/api/sd/liquidity/rank選擇一個端點並按下「送出請求」。回應內容、標頭與耗時會顯示在這裡。
此分類的其他端點
- 訂單簿深度與滑點 /api/sd/liquidity
- 訂單簿深度歷史 /api/sd/liquidity/history
- 依訂單簿深度排行的幣種 /api/sd/liquidity/rank
- 大額掛單監控 /api/indicators/large-orderbook