系统 Python 指标源码与文档
GET/api/v1.0/quote/system-indicator-python-docs/details按系统指标目录中的 guid 获取系统指标 Python 源码、说明与输入输出参数,locale 须与目录相同。需登录用户;guid 去重并去除两端空白后区分大小写匹配,未命中的原始 guid 列在 not_found。
请求参数
| 参数 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
locale | string | 查询 | 否 | 语言,默认 zh-CN,支持 en、zh-CN、zh-Hans-CN、ja-JP;zh-Hans-CN 与 zh-CN 对应独立目录 |
guids | string[] | 查询 | 是 | 1 到 20 个 guid(去重前查询项上限 20),服务端去除首尾空白并去重后区分大小写匹配;查询多个值时重复传入同名查询参数 |
请求示例
bash
curl -s "https://webapi.futunn.com/api/v1.0/quote/system-indicator-python-docs/details?locale=en&guids=901A30FB285C4f1aB536F3829DD41B6C" \
-H "Authorization: Bearer <AccessToken>"响应字段
以下为 data 内字段。
| 字段 | 类型 | 说明 |
|---|---|---|
locale | string | 实际使用的语言 |
catalog_version | string | 产生本次源码的快照版本,建议与 locale 组合作为缓存键 |
indicators | object[] | 找到的指标列表,按请求顺序排列,最多 20 条 |
indicators[].guid | string | 去除首尾空白后的 guid |
indicators[].py_indicator_name | string | Python 指标名,允许为空串 |
indicators[].indicator_short_name | string | 指标简称 |
indicators[].indicator_name | string | 指标名称 |
indicators[].summary | string | 短说明,与目录接口一致 |
indicators[].py_doc | string | Python 说明全文,缺失时为空串 |
indicators[].py_indicator_src | string | Python 源码 |
indicators[].py_input_parameters | string | 入参定义 JSON 字符串 |
indicators[].py_output_parameter | string | 出参定义 JSON 字符串 |
not_found | string[] | 该语言下未命中的原始 guid 列表,最多 20 个;全部命中时为空数组 |
响应示例
json
{
"code": 0,
"message": "success",
"data": {
"locale": "en",
"catalog_version": "2b8f67",
"indicators": [],
"not_found": [
"901A30FB285C4f1aB536F3829DD41B6C"
]
}
}错误码
失败响应(code != 0)会在顶层附加 trace_id(code=0 时省略)。
| code | 说明 |
|---|---|
| -3 | 请求参数不合法,例如缺失 guids、guids 超过 20 项或 locale 不在允许范围内 |
| -5 | 未登录、用户归属地不在支持范围(支持 CN/HKG/US/SG/AU/JP)或内部查询失败 |
| -9 | 当前访问策略拒绝 |
| -11 | 请求过于频繁,按 Retry-After 秒数退避 |
| -13 | 限频服务暂不可用 |