/api/sd/options/history
GET降级STALE

期权历史(小时级)

单个币种的期权持仓量、成交量、看跌/看涨比、ATM IV 或最大痛点的小时级序列。历史自 CoinBoss 开始采集之时(2026-11-11)起算;更早的小时不做回填。

GET/api/sd/options/history
部分覆盖. 该序列的采集始于 2026-11-11。在所请求的范围填满之前,响应返回已有的数据点,给出 `points_count` 与 `expected_points` 的对比,并标记 `meta.quality = "PARTIAL"`。缺失的小时不做插值。
降级. 该端点上报的数据质量为 STALE

请求

查询参数

名称类型必填默认值可选值说明
coinstring必填——币种代码,不区分大小写(例如 `BTC`)。缺失或格式错误时返回 400。 示例: BTC
metricstring必填—oi, volume, pcr, atm_iv, max_pain要返回的序列。 示例: oi
rangestring可选7d24h, 7d, 30d, 90d回溯范围;每小时一个点,最多 2160 个点。
exchangestring可选allall, deribit, binance, bybit, okx, gate, coincall单个交易所,或用 `all` 表示跨交易所聚合值。

请求示例

curl -s "https://www.coinboss.com/api/sd/options/history?coin=BTC&metric=oi"

响应字段

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

字段类型单位说明
successboolean—请求成功时为 true。失败时响应体为 `{ success: false, code, error, request_id }`。
schemastring—本响应的结构 ID。仅当已有字段的含义或类型发生变化时才会改变。
nownumberms响应生成时的服务器时间。
coinstring—币种代码(大写)。
exchangestring—交易所 ID(小写)。
metricstring—由 `metric` 参数选定的序列。
rangestring—实际采用的回溯范围。
intervalstring—序列数据点的间隔。
points_countnumber—返回的数据点数量。
expected_pointsnumber—所请求范围完整时应有的小时数据点数量。
history_started_atnumbermsCoinBoss 采集到的第一个小时的时间。
first_tnumberms返回的第一个数据点的时间。
last_tnumberms返回的最后一个数据点的时间。
pointsarray—序列数据点,按时间从早到晚排列。
points[]object—序列数据点,按时间从早到晚排列。
points[].tnumberms时间桶的起始时间。
points[].snapshot_atnumberms写入该数据点的那一轮采集的时间。
points[].n_exchangesnumber—该数据点中的交易所数量。
points[].exchangesarray—该行计入的交易所。
points[].exchanges[]string—该行计入的交易所。
points[].oi_usdnumberUSD以 USD 名义价值计的持仓量:币数量 × 现货指数价格。单边口径。 可能缺失
points[].call_oi_usdnumberUSD看涨持仓量,USD 名义价值。 可能缺失
points[].put_oi_usdnumberUSD看跌持仓量,USD 名义价值。 可能缺失
points[].oi_coinnumbercoin以标的币数量计的持仓量。 可能缺失
points[].index_pricenumberUSD用于 USD 换算的现货指数价格(在聚合值中取各交易所自身指数价格的中位数)。 可能缺失
coverageobject—这些数值包含什么、不包含什么。在与其他数据源比较合计之前,请先比对这一点。
coverage.included_exchangesarray—新鲜数据已计入的数据源。
coverage.included_exchanges[]string—新鲜数据已计入的数据源。
coverage.unavailablearray—无法计入的数据源,每项均附原因。它们绝不会按 0 计。
coverage.unavailable[]object—无法计入的数据源,每项均附原因。它们绝不会按 0 计。
coverage.unavailable[].exchangestring—交易所 ID(小写)。
coverage.unavailable[].reasonstring—机器可读的原因代码。
coverage.unavailable[].detailstring—供人阅读的原因说明。
coverage.stale_excludedarray—因最近一次更新超出新鲜窗口而被排除的行。 在生成此表所用的样本中为空
methodobject—以纯文本说明本响应所用的公式,每个字段一条。
method.pointsstring—`points` 的公式说明,纯文本。
method.exchangesstring—`exchanges` 的公式说明,纯文本。
method.history_depthstring—`history_depth` 的公式说明,纯文本。
method.oi_usdstring—`oi_usd` 的公式说明,纯文本。 可能缺失
metaobject—本响应的数据来源与新鲜度。
meta.schemastring—本响应的结构 ID。仅当已有字段的含义或类型发生变化时才会改变。
meta.sourcearray—采集数据所用的上游公开端点。
meta.source[]object—采集数据所用的上游公开端点。
meta.source[].exchangestring—交易所 ID(小写)。
meta.source[].endpointstring—采集器读取的数据源公开端点(仅用于说明数据来源;客户端不会调用它)。
meta.observed_atnull—数据源为该数据给出的时间戳。
meta.received_atnumbermsCoinBoss 采集器收到该数据的时间。
meta.fetched_atnumberms本响应的组装时间。
meta.windowstring—这些数值覆盖的时间窗口。
meta.qualitystring—FRESH、PARTIAL、STALE、BROKEN 或 UNAVAILABLE,根据数据时间戳和覆盖范围判定。
meta.is_staleboolean—数据早于其新鲜窗口时为 true。
meta.cache_ttl_snumbers本响应的缓存有效期。
meta.fallbackstring—采集器或数据源出现故障时端点返回的内容。
points[].pcr_oinumberratio看跌持仓量 ÷ 看涨持仓量,以币数量计;看涨一侧为 0 时为 `null`。 可能缺失
points[].pcr_volnumberratio看跌 24h 成交量 ÷ 看涨 24h 成交量,以币数量计;看涨一侧为 0 时为 `null`。 可能缺失
method.pcr_oistring—`pcr_oi` 的公式说明,纯文本。 可能缺失
method.pcr_volstring—`pcr_vol` 的公式说明,纯文本。 可能缺失
points[].atm_iv_30dnumber%线性插值到固定 30 天期限的 ATM IV;30 天未落在两个到期日之间时为 `null`。 可能缺失
method.atm_ivstring—`atm_iv` 的公式说明,纯文本。 可能缺失
method.atm_iv_30dstring—`atm_iv_30d` 的公式说明,纯文本。 可能缺失

生成于 2026-11-11 23:00 UTC,基于 3 个真实响应。

响应示例

/api/sd/options/history?coin=BTC&metric=oi · 真实响应,采集于 2026-11-13 03:58:20 UTC。 为便于展示,较长的数组和映射已被截短:points 原有 23 项; meta.source 原有 6 项; coverage.unavailable 原有 12 项。

  • {
    • "success": true,
    • "schema": "coinboss.sd.options/1",
    • "now": 1794542300888,
    • "coin": "BTC",
    • "exchange": "all",
    • "metric": "oi",
    • "range": "7d",
    • "interval": "1h",
    • "points_count": 23,
    • "expected_points": 168,
    • "history_started_at": 1794416400000,
    • "first_t": 1794416400000,
    • "last_t": 1794520800000,
    • "points": [
      • { … 9 },
      • { … 9 }
      ],
    • "coverage": {
      • "included_exchanges": [ … 6 ],
      • "unavailable": [ … 2 ],
      • "stale_excluded": []
      },
    • "method": {
      • "points": "one point per UTC hour bucket (t = bucket start, ms); the value is the LAST collector snapshot inside that hour (snapshot_at); hours in which the collector prod…",
      • "exchanges": "exchanges that were fresh and therefore included in that hour's figure; a change in this list between points explains level shifts in the all-exchange series",
      • "history_depth": "hourly summaries are kept for 90 days; the series starts when the collector was first deployed (history_started_at), so fewer points than the requested range ma…",
      • "oi_usd": "sum over contracts of oi_coin x that exchange's spot index price (USDT/USDC treated 1:1 as USD); oi_coin is open interest in units of the underlying coin after …"
      },
    • "meta": {
      • "schema": "coinboss.sd.options/1",
      • "source": [ … 2 ],
      • "observed_at": null,
      • "received_at": 1794522484809,
      • "fetched_at": 1794542300888,
      • "window": "7d",
      • "quality": "STALE",
      • "is_stale": true,
      • "cache_ttl_s": 300,
      • "fallback": "hours without a collector snapshot are absent from the series (no interpolation); PARTIAL means fewer hourly points exist than the requested range (history shor…"
      }
    }

已验证的样本

除上面的示例外,探针还会使用以下参数调用该端点,并在每次调用时校验结构。

参数HTTP延迟结果
coin=ETH&range=24h&metric=pcr2002 ms通过 STALE
coin=BTC&metric=atm_iv2003 ms通过 STALE
coin=BTC4001 ms通过 返回预期的错误

检查于 2026-11-13 03:58:20 UTC

详细信息

身份验证
无。公开端点。
速率限制
每个 IP 每分钟 1200 次请求
服务端缓存
5m
边缘微缓存
10s
更新频率
每小时一个点,取自该小时最后一轮采集。
时间窗口
24h / 7d / 30d / 90d,小时级数据点。
数据来源
Deribit、Binance、Bybit、OKX、Gate 和 Coincall 的公开 REST 期权端点,由 CoinBoss 采集并存储(sd_opt_latest、sd_opt_summary_hourly)。不涉及任何第三方聚合商。
交易所覆盖范围
六家期权交易所。在所选交易所没有上线期权的币种返回 HTTP 200,字段为 null,`meta.quality = "UNAVAILABLE"`,原因列在 `coverage.unavailable` 下。没有公开期权数据源的交易所也列在该处。
分页
不分页;`range` 决定数据点数量的上限。
排序
按时间升序。
单位
USD notional = contracts × contract size × spot index price of the venue. `*_coin` fields are in units of the underlying coin. Implied volatility is in percent (55 = 55 %). `vol_premium_usd_24h` is premium turnover, reported separately and never added to notional volume.
时间戳
除非字段说明另有注明,均为 Unix 纪元毫秒(UTC)
响应格式
json
稳定性
稳定
上线时间
2026-11-11

实时状态

降级检查于 2026-11-13 03:58:20 UTCHTTP 2002 ms结构一致最新数据点距今 6h

该端点上报的数据质量为 STALE

近 30 天可用性

407 次检查中 99.75% 通过

错误

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

错误码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/options/history降级
参数

string — Coin symbol, case-insensitive (for example `BTC`). Missing or malformed values return 400.

string — Series to return.

string · 默认 7d — Look-back range; one point per hour, 2160 points at most.

string · 默认 all — One venue, or `all` for the cross-venue aggregate.

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