Skip to content

系统 Python 指标源码与文档 ​

GET /api/v1.0/quote/system-indicator-python-docs/details

按系统指标目录中的 guid 获取系统指标 Python 源码、说明与输入输出参数,locale 须与目录相同。需登录用户;guid 去重并去除两端空白后区分大小写匹配,未命中的原始 guid 列在 not_found。

请求参数 ​

参数类型位置必填说明
localestring查询否语言,默认 zh-CN,支持 en、zh-CN、zh-Hans-CN、ja-JP;zh-Hans-CN 与 zh-CN 对应独立目录
guidsstring[]查询是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 内字段。

字段类型说明
localestring实际使用的语言
catalog_versionstring产生本次源码的快照版本,建议与 locale 组合作为缓存键
indicatorsobject[]找到的指标列表,按请求顺序排列,最多 20 条
indicators[].guidstring去除首尾空白后的 guid
indicators[].py_indicator_namestringPython 指标名,允许为空串
indicators[].indicator_short_namestring指标简称
indicators[].indicator_namestring指标名称
indicators[].summarystring短说明,与目录接口一致
indicators[].py_docstringPython 说明全文,缺失时为空串
indicators[].py_indicator_srcstringPython 源码
indicators[].py_input_parametersstring入参定义 JSON 字符串
indicators[].py_output_parameterstring出参定义 JSON 字符串
not_foundstring[]该语言下未命中的原始 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限频服务暂不可用