瓯衍公开数据站的**结构化接口**(P1 · 白名单制)。用 X-Api-Key 鉴权,
只提供统计结果(基差率、分位、ATM IV 等),不含逐笔明细、策略持仓或方向判断。
契约版本 1.0 JSON 按 key 限流 自然月配额
← 回到瓯衍数据站 · 数据口径(字段含义以此为准) · 方法论台账(已否决方向)
目前**不开放自助注册**。请通过 联系我们 说明用途、调用频率与所需字段,我们按白名单签发一把密钥,并约定配额与责任边界。
所有数据端点都需要在请求头带上密钥:
X-Api-Key: fa_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
密钥格式:fa_live_ + 32 位十六进制。
只认 X-Api-Key 这一个头(Authorization: Bearer 留给登录用户 JWT,两者不混用)。
GET /api/v1/open/ping
{
"service": "oyan-open-api",
"schemaVersion": "1.0",
"status": "ok",
"serverTime": "2026-11-15T08:12:31.1234567+00:00"
}
GET /api/v1/open/fundamental/basis?product=RB&window=250
| 参数 | 说明 |
|---|---|
product | 品种代码(如 RB),省略=全部 |
window | 分位窗口(交易日),5–500,默认 250 |
{
"meta": {
"generatedAt": "2026-11-15T08:12:31.12+00:00",
"dataDate": "2026-11-13",
"schemaVersion": "1.0",
"serviceReady": true,
"key": { "name": "XX 研究所-日频拉取", "scopes": ["fundamental:read"] },
"quota": { "perMinute": 60, "monthly": 100000, "monthUsed": "128" }
},
"rows": [
{
"product": "RB",
"tradeDate": "2026-11-13",
"basisRatePct": 4.32,
"basisRatePctile": 100,
"basisRateChg20Pp": 1.12,
"inventory": 123456,
"inventoryChg": -1173,
"inventoryPctile": 4,
"profit": null,
"profitRatePct": null,
"profitPctile": null,
"virtualReal": 1.83,
"virtualRealPctile": 62,
"basisQuality": "ok"
}
],
"disclaimer": "数据为交易所公开行情与公告的统计整理,仅供研究参考,不构成投资建议或收益承诺。"
}
null。
请按 null 处理,不要当作 0——那会把"没数据"读成"数值为零"。
GET /api/v1/open/options/iv?product=AU
{
"meta": { "dataDate": "2026-11-13", "schemaVersion": "1.0", "...": "同上" },
"rows": [
{
"product": "AU",
"tradeDate": "2026-11-13",
"nearAtmIv": 16.84,
"nextAtmIv": 17.51,
"termSlopePp": 0.67,
"fwdIv": null,
"inverted": false,
"nearIvPctile": 93,
"source": "term"
}
],
"disclaimer": "…"
}
| 字段 | 口径 |
|---|---|
termSlopePp | 次月 ATM IV − 近月 ATM IV(百分点)。正=顺挂;任一侧缺失为 null |
nearIvPctile | 近月 IV 在自身历史中的分位(0–100),与公开站同口径 |
source | term=期限结构因子(日更,字段全)/ atm=ATM 因子表(周更,仅 ATM IV) |
| 维度 | 行为 |
|---|---|
| 每分钟 | 固定 60 秒窗口,按密钥计。超限返回 429 + Retry-After(秒) |
| 自然月 | 按调用次数累计。超限返回 429,Retry-After 指向下月 1 日 0 点(UTC) |
每个成功响应都会回显当前配额,便于客户端自适应:
X-Api-Quota-Limit: 60
X-Api-Quota-Remaining: 58
X-Api-Month-Used: 128
X-Api-Month-Quota: 100000
| HTTP | error | 含义 / 处理 |
|---|---|---|
| 401 | missing_api_key | 没带 X-Api-Key |
| 401 | invalid_api_key | 密钥不存在或已吊销(不区分,防探测) |
| 403 | insufficient_scope | 密钥有效但没买这个数据范围 |
| 429 | minute_quota_exceeded | 按 Retry-After 退避后重试 |
| 429 | monthly_quota_exceeded | 本月额度用尽,需等下月或申请提额 |
| 503 | service_unavailable | 服务端密钥库不可达(**不是密钥问题**),请稍后重试并通知我们 |
{ "error": "insufficient_scope", "message": "该密钥未获得范围 options:read。", "status": 403 }
meta.dataDate**:同一天的数据重复拉取没有意义。schemaVersion 变更时会提前 30 天通知)。