/api/sd/funding
GET可用

单个币种的资金费率

自采数据层:单个币种的资金费率(8h 归一化、加权)

GET/api/sd/funding

请求

查询参数

名称类型必填默认值可选值说明
coinstring必填——币种代码;缺失时返回 400。别名:`base`。 示例: BTC

请求示例

curl -s "https://www.coinboss.com/api/sd/funding?coin=BTC"

响应字段

字段表根据真实响应生成,因此所列内容与端点实际返回的完全一致。路径中 a[] 表示数组元素,{*} 表示以动态名称(如币种或交易所)为键的对象。

字段类型单位说明
successboolean—请求成功时为 true。失败时响应体为 `{ success: false, code, error, request_id }`。
coinstring—币种代码,大写(例如 BTC)。
nownumberms响应生成时的服务器时间。
unitstring—本响应中所有费率字段的单位:`fraction`(0.0001 = 0.01 %)。
avg_8hnumberfraction per 8h8h 归一化费率的简单均值,每家交易所取一个合约。
oi_weighted_8hnumberfraction per 8h8h 归一化费率的持仓量加权均值。
apr_pctnumber% per year简单年化:8h 费率 × 3 × 365 × 100。
apr_basisstring—主要展示的 `apr_pct` 所依据的聚合值。
n_exchangesnumber—参与计算的交易所数量。
n_normalizednumber—资金费周期已知、可归一化到 8h 的交易所。
n_unknown_intervalnumber—因资金费周期未知而未计入聚合值的交易所。
settled_cum_7dobject—最近 7 天实际结算的资金费率之和,在有结算历史的交易所之间取平均。
settled_cum_7d.avgnumberfraction各交易所的简单均值。
settled_cum_7d.oi_weightednumberfraction持仓量加权均值。
settled_cum_7d.nnumber—窗口数据完整的交易所。
settled_cum_30dobject—同上,按 30 天计。
settled_cum_30d.avgnumberfraction各交易所的简单均值。
settled_cum_30d.oi_weightednumberfraction持仓量加权均值。
settled_cum_30d.nnumber—窗口数据完整的交易所。
by_exchangearray—每家交易所一行:该币种在该交易所的主力合约(持仓量最大的合约)。
by_exchange[]object—各交易所明细。
by_exchange[].exchangestring—交易所 ID,小写(例如 `binance`)。
by_exchange[].symbolstring—经 CoinBoss 归一化的合约代码(例如 BTCUSDT)。
by_exchange[].marginstring—保证金币种类别。
by_exchange[].kindstring—种类。
by_exchange[].primaryboolean—在聚合值中代表该交易所的合约为 true。
by_exchange[].ratenumber—交易所公布的当前周期资金费率。
by_exchange[].interval_hnumberh资金费周期。
by_exchange[].rate_8hnumber—归一化到 8 小时周期的费率:rate × 8 / interval_h。
by_exchange[].apr_pctnumber% per year年化百分比。
by_exchange[].next_funding_timenumber|nullms下次结算时间。
by_exchange[].next_derivedboolean—下次结算时间由周期推算得出、而非由交易所公布时为 true。
by_exchange[].predicted_ratenull—交易所公布的下一周期预测费率;未公布时为 null。
by_exchange[].oi_usdnumber|nullUSD持仓量,以 USD 名义价值计。
by_exchange[].updated_atnumberms该行最近一次更新的时间。
by_exchange[].age_snumbers该行距上次更新的秒数。
by_exchange[].is_staleboolean—该行超出新鲜窗口时为 true;过期的行不计入合计。
by_exchange[].settledobject|null—该合约的实际结算记录;交易所没有公开历史时为 null。
by_exchange[].settled.last_ratenumber—最近一次结算的费率。 可能缺失
by_exchange[].settled.last_timenumberms最近一次结算的时间。 可能缺失
by_exchange[].settled.interval_hnumberh资金费周期。 可能缺失
by_exchange[].settled.cum_7dnumber—最近 7 天已结算费率之和。 可能缺失
by_exchange[].settled.n_7dnumber—最近 7 天内找到的结算次数。 可能缺失
by_exchange[].settled.n_7d_expectednumber—按该周期 7 天内应有的结算次数。 可能缺失
by_exchange[].settled.cum_7d_completeboolean—7 天窗口内没有缺失任何一次结算时为 true。 可能缺失
by_exchange[].settled.cum_30dnumber—最近 30 天已结算费率之和。 可能缺失
by_exchange[].settled.n_30dnumber—最近 30 天内找到的结算次数。 可能缺失
by_exchange[].settled.n_30d_expectednumber—按该周期 30 天内应有的结算次数。 可能缺失
by_exchange[].settled.cum_30d_completeboolean—30 天窗口内没有缺失任何一次结算时为 true。 可能缺失
by_exchange[].settled.history_fromnumberms该合约所存最早的结算记录。 可能缺失
other_contractsarray—同一币种的其他合约(USDC 本位、币本位等)。不计入聚合值。
other_contracts[]object—某交易所的一个附加资金费合约(币本位、USDC 等),它不是该交易所的主合约,不计入聚合值。
other_contracts[].exchangestring—交易所 ID,小写(例如 `binance`)。
other_contracts[].symbolstring—经 CoinBoss 归一化的合约代码(例如 BTCUSDT)。
other_contracts[].marginstring—保证金币种类别。
other_contracts[].kindstring—种类。
other_contracts[].primaryboolean—在聚合值中代表该交易所的合约为 true。
other_contracts[].ratenumber—交易所公布的当前周期资金费率。
other_contracts[].interval_hnumber|nullh资金费周期。
other_contracts[].rate_8hnumber|null—归一化到 8 小时周期的费率:rate × 8 / interval_h。
other_contracts[].apr_pctnumber|null% per year年化百分比。
other_contracts[].next_funding_timenumber|nullms下次结算时间。
other_contracts[].next_derivedboolean—下次结算时间由周期推算得出、而非由交易所公布时为 true。
other_contracts[].predicted_ratenumber|null—交易所公布的下一周期预测费率;未公布时为 null。
other_contracts[].oi_usdnumber|nullUSD持仓量,以 USD 名义价值计。
other_contracts[].updated_atnumberms该行最近一次更新的时间。
other_contracts[].age_snumbers该行距上次更新的秒数。
other_contracts[].is_staleboolean—该行超出新鲜窗口时为 true;过期的行不计入合计。
other_contracts[].settledobject|null—该合约的实际结算记录;交易所没有公开历史时为 null。
other_contracts[].settled.last_ratenumber—最近一次结算的费率。 可能缺失
other_contracts[].settled.last_timenumberms最近一次结算的时间。 可能缺失
other_contracts[].settled.interval_hnumberh资金费周期。 可能缺失
other_contracts[].settled.cum_7dnumber—最近 7 天已结算费率之和。 可能缺失
other_contracts[].settled.n_7dnumber—最近 7 天内找到的结算次数。 可能缺失
other_contracts[].settled.n_7d_expectednumber—按该周期 7 天内应有的结算次数。 可能缺失
other_contracts[].settled.cum_7d_completeboolean—7 天窗口内没有缺失任何一次结算时为 true。 可能缺失
other_contracts[].settled.cum_30dnumber—最近 30 天已结算费率之和。 可能缺失
other_contracts[].settled.n_30dnumber—最近 30 天内找到的结算次数。 可能缺失
other_contracts[].settled.n_30d_expectednumber—按该周期 30 天内应有的结算次数。 可能缺失
other_contracts[].settled.cum_30d_completeboolean—30 天窗口内没有缺失任何一次结算时为 true。 可能缺失
other_contracts[].settled.history_fromnumberms该合约所存最早的结算记录。 可能缺失
coverageobject—上述数值包含什么、不包含什么。在与其他数据源比较合计之前,请先比对这一点。
coverage.settle_history_exchangesarray—已采集实际结算记录的交易所。
coverage.settle_history_exchanges[]string—已为该币种采集实际资金费结算记录的交易所 ID。
coverage.no_settle_historyarray—没有公开结算历史数据源的交易所;其 `settled` 为 null。
coverage.no_settle_history[]string—主合约没有采集到结算历史的交易所 ID,因此其 `settled` 块为 null。
coverage.unknown_intervalarray—无法确定资金费周期的行。 在生成此表所用的样本中为空
coverage.no_liveness_excludedarray—因合约没有任何交易迹象(近期没有行情、持仓量或报价)而被排除的行。 在生成此表所用的样本中为空
methodobject—以纯文本说明本响应所用的公式。
method.ratestring—交易所公布的当前周期资金费率。
method.rate_8hstring—归一化到 8 小时周期的费率:rate × 8 / interval_h。
method.apr_pctstring% per year年化百分比。
method.aggregatestring—跨交易所聚合值。
method.settledstring—该合约的实际结算记录;交易所没有公开历史时为 null。
method.predicted_ratestring—交易所公布的下一周期预测费率;未公布时为 null。
method.livenessstring—剔除失效合约的纯文本规则:资金费行只有在 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": [
      • { … 17 },
      • { … 17 }
      ],
    • "other_contracts": [
      • { … 17 },
      • { … 17 }
      ],
    • "coverage": {
      • "settle_history_exchanges": [ … 8 ],
      • "no_settle_history": [ … 7 ],
      • "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=ETH20043 ms通过
coin=SOL20044 ms通过
coin=ARKM20041 ms通过
—4001 ms通过 返回预期的错误

检查于 2026-11-13 03:57:42 UTC

详细信息

身份验证
无。公开端点。
速率限制
每个 IP 每分钟 1200 次请求
服务端缓存
20s
边缘微缓存
10s
更新频率
多数交易所每 60 秒(与行情一并写入;binance 有专用的 60 秒任务);其余资金费率任务和币本位合约每 5 分钟;结算记录每小时
时间窗口
最新快照(4 小时内的资金费率行,且合约的行情 / OI 仍在更新);7 天和 30 天的已结算合计
数据来源
当前资金费率由自有采集器轮询 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 纪元毫秒(UTC)
响应格式
json
稳定性
稳定
上线时间
2026-11-11

实时状态

可用检查于 2026-11-13 03:57:42 UTCHTTP 20052 ms结构一致最新数据点距今 1s

近 30 天可用性

410 次检查中 100% 通过

错误

所有端点的失败响应格式一致。完整列表见错误页面。 错误与速率限制 →

错误码HTTP含义处理方式
INVALID_PARAM400缺少必填参数,或某个取值不被接受。已知是哪个参数时,`param` 会给出其名称。请勿原样重试;请修正请求。
UNAUTHORIZED401已发送 `CB-API-KEY` 请求头,但该密钥未知或已被吊销。公开数据无需密钥,请去掉该请求头或使用有效密钥。请勿原样重试。
FORBIDDEN403该路由不属于公开 API(内部或仅限账户使用)。请勿重试。
NOT_FOUND404未知路由,或所请求的币种 / 交易所 / 基金不存在。请勿重试;请对照目录检查路径和标识符。
RATE_LIMITED429请求数超过每分钟限额。`Retry-After` 给出需要等待的秒数。等待 `Retry-After` 指定的时间后,再以退避方式重试。
INTERNAL500意外的服务器错误。错误信息有意保持通用;报告问题时请附上 `request_id`。几秒后重试一次;若问题持续,请附上请求 ID 报告。
UPSTREAM_FAILED503该端点背后的数据源未及时响应。不会返回过期数据或替代数值来顶替。以退避方式重试;并查看状态页。
UNAVAILABLE501 / 503数据集暂时未就绪(缓存预热中),或该端点尚无合法的公开数据源。请稍后重试;目录会标出因设计原因而不可用的端点。
REQUEST_FAILED200部分较旧的端点会以 HTTP 200 返回 `success: false`。请务必检查 `success`,而不只是 HTTP 状态码。取决于具体信息;按请求失败处理。

试一试

GET/api/sd/funding可用
参数

string — Coin symbol; 400 when missing. Alias: `base`.

请求 URLhttps://www.coinboss.com/api/sd/funding?coin=BTC
选择一个端点,然后点击“发送请求”。响应、响应头和耗时将显示在这里。