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 秒(与行情一并写入;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_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