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限頻服務暫不可用