GET可用
單一幣種的資金費率
自研資料層:單一幣種的資金費率(8h 歸一化、加權)
GET
/api/sd/funding請求
查詢參數
| 名稱 | 型別 | 必填 | 預設值 | 可用值 | 說明 |
|---|---|---|---|---|---|
| coin | string | 必填 | — | — | 幣種代號;缺少時回傳 400。別名:`base`。 範例: BTC |
請求範例
curl -s "https://www.coinboss.com/api/sd/funding?coin=BTC"回應欄位
欄位表由真實回應產生,因此列出的正是端點實際回傳的內容。路徑中的 a[] 代表陣列元素,{*} 代表以動態名稱(例如幣種或交易所)為鍵的物件。
| 欄位 | 型別 | 單位 | 說明 |
|---|---|---|---|
| success | boolean | — | 請求成功時為 true。失敗時回應內容為 `{ success: false, code, error, request_id }`。 |
| coin | string | — | 幣種代號,大寫(例如 BTC)。 |
| now | number | ms | 建立回應時的伺服器時間。 |
| unit | string | — | 此回應中所有費率欄位的單位:`fraction`(0.0001 = 0.01 %)。 |
| avg_8h | number | fraction per 8h | 8h 歸一化費率的簡單平均,每家交易所取一個合約。 |
| oi_weighted_8h | number | fraction per 8h | 8h 歸一化費率的持倉量加權平均。 |
| apr_pct | number | % per year | 簡單年化:8h 費率 × 3 × 365 × 100。 |
| apr_basis | string | — | 主要顯示的 `apr_pct` 所依據的彙總值。 |
| n_exchanges | number | — | 納入計算的交易所數量。 |
| n_normalized | number | — | 資金費率結算週期已知、可歸一為 8h 的交易所。 |
| n_unknown_interval | number | — | 因資金費率結算週期不明而未計入彙總的交易所。 |
| settled_cum_7d | object | — | 過去 7 天實際結算的資金費率加總,再對有結算歷史的交易所取平均。 |
| settled_cum_7d.avg | number | fraction | 跨交易所的簡單平均。 |
| settled_cum_7d.oi_weighted | number | fraction | 持倉量加權平均。 |
| settled_cum_7d.n | number | — | 時間視窗完整的交易所。 |
| settled_cum_30d | object | — | 同上,但為 30 天。 |
| settled_cum_30d.avg | number | fraction | 跨交易所的簡單平均。 |
| settled_cum_30d.oi_weighted | number | fraction | 持倉量加權平均。 |
| settled_cum_30d.n | number | — | 時間視窗完整的交易所。 |
| by_exchange | array | — | 每家交易所一列:該交易所此幣種的主力合約(持倉量最大者)。 |
| by_exchange[] | object | — | 各交易所明細。 |
| by_exchange[].exchange | string | — | 交易所 ID,小寫(例如 `binance`)。 |
| by_exchange[].symbol | string | — | 經 CoinBoss 正規化的交易品種代號(例如 BTCUSDT)。 |
| by_exchange[].margin | string | — | 保證金幣種類別。 |
| by_exchange[].kind | string | — | 種類。 |
| by_exchange[].primary | boolean | — | 在彙總中代表該交易所的合約為 true。 |
| by_exchange[].rate | number | — | 交易所公布的當期資金費率。 |
| by_exchange[].interval_h | number | h | 資金費率結算週期。 |
| by_exchange[].rate_8h | number | — | 歸一為 8 小時週期的費率:rate × 8 / interval_h。 |
| by_exchange[].apr_pct | number | % per year | 年化百分比。 |
| by_exchange[].next_funding_time | number|null | ms | 下次結算時間。 |
| by_exchange[].next_derived | boolean | — | 下次結算時間是由結算週期推算、而非交易所公布時為 true。 |
| by_exchange[].predicted_rate | null | — | 交易所有公布時為下一期的預估費率;否則為 null。 |
| by_exchange[].oi_usd | number|null | USD | 持倉量,以 USD 名義價值計。 |
| by_exchange[].updated_at | number | ms | 此資料列最近一次更新的時間。 |
| by_exchange[].age_s | number | s | 此資料列距上次更新的秒數。 |
| by_exchange[].is_stale | boolean | — | 資料列超出新鮮視窗時為 true;過期的資料列不計入總額。 |
| by_exchange[].settled | object|null | — | 此合約的實際結算紀錄;交易所沒有公開歷史時為 null。 |
| by_exchange[].settled.last_rate | number | — | 最近一次結算的費率。 可能不存在 |
| by_exchange[].settled.last_time | number | ms | 最近一次結算的時間。 可能不存在 |
| by_exchange[].settled.interval_h | number | h | 資金費率結算週期。 可能不存在 |
| by_exchange[].settled.cum_7d | number | — | 過去 7 天已結算費率的加總。 可能不存在 |
| by_exchange[].settled.n_7d | number | — | 過去 7 天內找到的結算次數。 可能不存在 |
| by_exchange[].settled.n_7d_expected | number | — | 依此結算週期,7 天內應有的結算次數。 可能不存在 |
| by_exchange[].settled.cum_7d_complete | boolean | — | 7 天時間視窗內沒有缺漏任何一次結算時為 true。 可能不存在 |
| by_exchange[].settled.cum_30d | number | — | 過去 30 天已結算費率的加總。 可能不存在 |
| by_exchange[].settled.n_30d | number | — | 過去 30 天內找到的結算次數。 可能不存在 |
| by_exchange[].settled.n_30d_expected | number | — | 依此結算週期,30 天內應有的結算次數。 可能不存在 |
| by_exchange[].settled.cum_30d_complete | boolean | — | 30 天時間視窗內沒有缺漏任何一次結算時為 true。 可能不存在 |
| by_exchange[].settled.history_from | number | ms | 此合約所保存的最早結算紀錄。 可能不存在 |
| other_contracts | array | — | 同一幣種的其他合約(USDC 本位、幣本位……)。不計入彙總。 |
| other_contracts[] | object | — | 某交易所另一個有資金費率的合約(幣本位、USDC 本位…),並非其主力合約,不計入彙總。 |
| other_contracts[].exchange | string | — | 交易所 ID,小寫(例如 `binance`)。 |
| other_contracts[].symbol | string | — | 經 CoinBoss 正規化的交易品種代號(例如 BTCUSDT)。 |
| other_contracts[].margin | string | — | 保證金幣種類別。 |
| other_contracts[].kind | string | — | 種類。 |
| other_contracts[].primary | boolean | — | 在彙總中代表該交易所的合約為 true。 |
| other_contracts[].rate | number | — | 交易所公布的當期資金費率。 |
| other_contracts[].interval_h | number|null | h | 資金費率結算週期。 |
| other_contracts[].rate_8h | number|null | — | 歸一為 8 小時週期的費率:rate × 8 / interval_h。 |
| other_contracts[].apr_pct | number|null | % per year | 年化百分比。 |
| other_contracts[].next_funding_time | number|null | ms | 下次結算時間。 |
| other_contracts[].next_derived | boolean | — | 下次結算時間是由結算週期推算、而非交易所公布時為 true。 |
| other_contracts[].predicted_rate | number|null | — | 交易所有公布時為下一期的預估費率;否則為 null。 |
| other_contracts[].oi_usd | number|null | USD | 持倉量,以 USD 名義價值計。 |
| other_contracts[].updated_at | number | ms | 此資料列最近一次更新的時間。 |
| other_contracts[].age_s | number | s | 此資料列距上次更新的秒數。 |
| other_contracts[].is_stale | boolean | — | 資料列超出新鮮視窗時為 true;過期的資料列不計入總額。 |
| other_contracts[].settled | object|null | — | 此合約的實際結算紀錄;交易所沒有公開歷史時為 null。 |
| other_contracts[].settled.last_rate | number | — | 最近一次結算的費率。 可能不存在 |
| other_contracts[].settled.last_time | number | ms | 最近一次結算的時間。 可能不存在 |
| other_contracts[].settled.interval_h | number | h | 資金費率結算週期。 可能不存在 |
| other_contracts[].settled.cum_7d | number | — | 過去 7 天已結算費率的加總。 可能不存在 |
| other_contracts[].settled.n_7d | number | — | 過去 7 天內找到的結算次數。 可能不存在 |
| other_contracts[].settled.n_7d_expected | number | — | 依此結算週期,7 天內應有的結算次數。 可能不存在 |
| other_contracts[].settled.cum_7d_complete | boolean | — | 7 天時間視窗內沒有缺漏任何一次結算時為 true。 可能不存在 |
| other_contracts[].settled.cum_30d | number | — | 過去 30 天已結算費率的加總。 可能不存在 |
| other_contracts[].settled.n_30d | number | — | 過去 30 天內找到的結算次數。 可能不存在 |
| other_contracts[].settled.n_30d_expected | number | — | 依此結算週期,30 天內應有的結算次數。 可能不存在 |
| other_contracts[].settled.cum_30d_complete | boolean | — | 30 天時間視窗內沒有缺漏任何一次結算時為 true。 可能不存在 |
| other_contracts[].settled.history_from | number | ms | 此合約所保存的最早結算紀錄。 可能不存在 |
| coverage | object | — | 上述數字包含與不包含哪些內容。與其他來源比較總額之前,請先比對這一項。 |
| coverage.settle_history_exchanges | array | — | 有採集實際結算紀錄的交易所。 |
| coverage.settle_history_exchanges[] | string | — | 已針對此幣種採集實際資金費率結算紀錄的交易所 ID。 |
| coverage.no_settle_history | array | — | 沒有公開結算歷史來源的交易所;其 `settled` 為 null。 |
| coverage.no_settle_history[] | string | — | 主力合約沒有採集到結算歷史的交易所 ID,因此其 `settled` 區塊為 null。 |
| coverage.unknown_interval | array | — | 無法判定資金費率結算週期的資料列。 在產生此表所用的樣本中為空 |
| coverage.no_liveness_excluded | array | — | 因合約沒有任何交易跡象(近期無行情、持倉量或報價)而被排除的資料列。 在產生此表所用的樣本中為空 |
| method | object | — | 以純文字說明此回應所用的公式。 |
| method.rate | string | — | 交易所公布的當期資金費率。 |
| method.rate_8h | string | — | 歸一為 8 小時週期的費率:rate × 8 / interval_h。 |
| method.apr_pct | string | % per year | 年化百分比。 |
| method.aggregate | string | — | 跨交易所彙總值。 |
| method.settled | string | — | 此合約的實際結算紀錄;交易所沒有公開歷史時為 null。 |
| method.predicted_rate | string | — | 交易所有公布時為下一期的預估費率;否則為 null。 |
| method.liveness | string | — | 剔除失效合約之規則的純文字說明:資金費率資料列須有 1h 內的行情、3h 內的持倉量或 3h 內的自有報價,才會計入。 |
產生於 2026-11-11 23:00 UTC,依據 4 筆真實回應。
回應範例
/api/sd/funding?coin=BTC · 真實回應,擷取於 2026-11-13 03:57:42 UTC。 較長的陣列與對應表已截短顯示:by_exchange 原有 23 個項目; other_contracts 原有 18 個項目; coverage.settle_history_exchanges 原有 16 個項目。
- "success"true
- "coin""BTC"
- "now"1794542262267
- "unit""fraction"
- "avg_8h"0.00006731782608695654
- "oi_weighted_8h"0.00005745116946489526
- "apr_pct"6.2909
- "apr_basis""oi_weighted_8h"
- "n_exchanges"23
- "n_normalized"23
- "n_unknown_interval"0
- "settled_cum_7d"
- "avg"0.0016089506666666666
- "oi_weighted"0.0015317230977727185
- "n"15
- "settled_cum_30d"
- "avg"0.0066857086666666675
- "oi_weighted"0.006362887957085279
- "n"15
- "by_exchange"
- "other_contracts"
- "coverage"
- "settle_history_exchanges"
- "no_settle_history"
- "unknown_interval"
- "no_liveness_excluded"
- "method"
- "rate""current funding-period rate as published by the exchange (charged at next settlement; may change until then)"
- "rate_8h""rate × 8 / interval_h (rows with unknown interval excluded from aggregates)"
- "apr_pct""per exchange: rate_8h × 3 × 365 × 100; headline apr_pct = oi_weighted_8h × 3 × 365 × 100 (falls back to avg_8h when no OI weights; see apr_basis). Simple annual…"
- "aggregate""one contract per exchange (largest OI); avg_8h = simple mean; oi_weighted_8h = Σ(rate_8h × oi_usd)/Σoi_usd"
- "settled""actual settlement records collected from each exchange funding-history endpoint; cum = Σ settled rates in window"
- "predicted_rate""exchange-published indicative/next-period rate where available"
- "liveness""a funding row is used only if the same contract on the same exchange has a ticker within 1h, open interest within 3h, or a self-collected quote within 3h; rows …"
已驗證的樣本
除了上方的範例之外,探針還會以下列參數呼叫此端點,並在每次呼叫時檢查結構描述。
| 參數 | HTTP | 延遲 | 結果 |
|---|---|---|---|
| coin=ETH | 200 | 43 ms | 通過 |
| coin=SOL | 200 | 44 ms | 通過 |
| coin=ARKM | 200 | 41 ms | 通過 |
| — | 400 | 1 ms | 通過 回傳預期的錯誤 |
檢查於 2026-11-13 03:57:42 UTC
詳細資訊
- 身分驗證
- 無。公開端點。
- 速率限制
- 每個 IP 每分鐘 1200 次請求
- 伺服器快取
- 20s
- 邊緣微快取
- 10s
- 更新頻率
- 多數交易所每 60 s(與行情一併寫入;binance 有專用的 60 s 排程);其餘資金費率排程與幣本位合約每 5 min;結算紀錄每小時
- 時間視窗
- 最新快照(4 h 內的資金費率資料列,且合約須有活躍的行情/OI);7 d 與 30 d 的已結算加總
- 資料來源
- 當前資金費率,由自有採集器輪詢 24 家永續合約交易所(例如 binance、okx、bybit、bitget、gate、hyperliquid)的公開 REST API 取得。
- 交易所覆蓋範圍
- 當前費率涵蓋 24 家交易所;結算歷史來自 16 家交易所(binance、okx、bybit 的幣本位永續合約另行保存)
- 單位
- unit = 'fraction' (0.0001 = 0.01%); rate_8h normalized to 8 h; apr_pct in percent; times in Unix ms
- 計算方法
- one contract per exchange (largest OI); rate_8h = rate x 8 / interval_hours; avg_8h = simple mean; oi_weighted_8h = SUM(rate_8h x oi_usd) / SUM(oi_usd); apr_pct = rate_8h x 3 x 365 x 100; settled 7 d / 30 d = SUM of settlement records with a completeness flag (>= 90% of expected settlements)
- 時間戳記
- Unix epoch 毫秒(UTC),除非欄位說明另有註明
- 回應格式
- json
- 穩定性
- 穩定版
- 上線時間
- 2026-11-11
即時狀態
可用檢查於 2026-11-13 03:57:42 UTCHTTP 20052 ms結構描述相符最新資料點距今 1s
近 30 天可用率
410 次檢查中有 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/funding可用參數
string — Coin symbol; 400 when missing. Alias: `base`.
請求 URL
https://www.coinboss.com/api/sd/funding?coin=BTC選擇一個端點並按下「送出請求」。回應內容、標頭與耗時會顯示在這裡。
此分類的其他端點
- 單一幣種的資金費率 /api/sd/funding
- OI 加權/成交量加權資金費率歷史 /api/currency/funding-weighted
- 單一幣種在各交易所的資金費率明細 /api/derivatives/funding-detail
- 單一幣種在各交易所的累計資金費率 /api/funding/accumulated
- 資金費率套利機會 /api/funding/arbitrage
- 單一幣種的資金費率圖表序列 /api/funding/chart
- 單一幣種在各交易所的當前資金費率 /api/funding/coin
- 累計資金費用 /api/funding/fees
- 資金費率熱力圖 /api/funding/heatmap
- 單一幣種在單一交易所的資金費率歷史 /api/funding/history
- 資金費率矩陣 /api/funding/matrix
- 各幣種資金費率清單 /api/market/funding
- 跨交易所資金費率價差排行 /api/market/funding-spread