Skip to content

查询 API 目录 ​

GET /api/v1.0/quote/apis

按路径升序列出已上线的公开接口定义,包括请求方法、路径、参数约束和响应字段说明(可能包含本文档未单独成页的线上接口,如资讯类接口);本目录查询、权限查询、额度查询及订阅接口不在此列表中。

请求参数 ​

参数类型位置必填说明
pageinteger查询否页码,从 1 开始,默认 1
page_sizeinteger查询否每页接口数,默认 10,范围 1~20
keywordstring查询否关键词筛选(忽略大小写与首尾空格),匹配 api_id、path、description 或 description_en 子串;省略时列出全部条目

请求示例 ​

bash
curl -s "https://webapi.futunn.com/api/v1.0/quote/apis?keyword=/api/v1.0/quote/search-hot-topics&page_size=1" \
  -H "Authorization: Bearer <AccessToken>"

响应字段 ​

本接口无 data 包裹,成功响应顶层直接返回 apis 和 pagination。

字段类型说明
apisobject[]匹配的接口定义列表,按 path 升序排列;无匹配项时为空数组
apis[].api_idstring接口唯一标识
apis[].pathstring接口请求路径
apis[].methodstringHTTP 请求方法(如 GET、POST)
apis[].descriptionstring接口中文说明;未配置时省略
apis[].description_enstring接口英文说明;未配置时省略
apis[].requestobject请求参数与请求体定义
apis[].request.paramsobject[]路径与查询参数列表;无参数时为空数组
apis[].request.params[].namestring参数名称
apis[].request.params[].typestring参数类型(如 string、int、number、bool、array<string>、object_array)
apis[].request.params[].requiredboolean是否必填;非必填时省略
apis[].request.params[].defaultstring / number / boolean默认值;未设置时省略
apis[].request.params[].minnumber数值下限;未设置时省略
apis[].request.params[].maxnumber数值上限;未设置时省略
apis[].request.params[].minimumnumber数值下限;未设置时省略
apis[].request.params[].maximumnumber数值上限;未设置时省略
apis[].request.params[].minLengthinteger字符串最小字节长度或数组最小元素数;未设置时省略
apis[].request.params[].maxLengthinteger字符串最大字节长度或数组最大元素数;未设置时省略
apis[].request.params[].patternstring正则表达式校验规则;未设置时省略
apis[].request.params[].min_itemsinteger数组最小元素数;未设置时省略
apis[].request.params[].max_itemsinteger数组最大元素数;未设置时省略
apis[].request.params[].enumstring[] / integer[]允许的枚举取值列表;未设置时省略
apis[].request.params[].descstring参数中文说明;未配置时省略
apis[].request.params[].desc_enstring参数英文说明;未配置时省略
apis[].request.params[].fieldsobject[]嵌套子字段列表(元素结构同 params[]);无子字段时省略
apis[].request.bodyobject[]请求体字段列表(元素结构同 request.params[]);无请求体时为空数组
apis[].responseobject响应结构定义
apis[].response.wrapstring数据外层包装字段名(如 items);无包装时省略
apis[].response.fieldsobject响应字段字典(键为字段名);无声明字段时为空对象
apis[].response.fields.<field>.descstring字段中文说明;未配置时省略
apis[].response.fields.<field>.desc_enstring字段英文说明;未配置时省略
apis[].response.fields.<field>.wrapstring子树列表包装字段名;无包装时省略
apis[].response.fields.<field>.fieldsobject嵌套子字段字典(结构同 response.fields);无子字段时省略
paginationobject顶层分页信息
pagination.pageinteger当前页码(从 1 开始)
pagination.page_sizeinteger每页条目数
pagination.totalinteger匹配的接口总数
pagination.total_pagesinteger总页数;无匹配项时为 0
pagination.has_nextboolean是否有下一页
pagination.has_prevboolean是否有上一页;无匹配项时为 false

响应示例 ​

json
{
  "apis": [
    {
      "api_id": "quote.search_hot_topics",
      "description": "获取全市场实时热门搜索词条与话题列表。\n返回包含:词条 ID(item_id)、词条文本(text)、热度值(hot_value)与落地页跳转链接(url_scheme)。\n",
      "description_en": "Get real-time trending search topics and keywords.\nReturns: item_id, text, hot_value, and url_scheme.\n",
      "path": "/api/v1.0/quote/search-hot-topics",
      "method": "GET",
      "request": {
        "params": [],
        "body": []
      },
      "response": {
        "wrap": "items",
        "fields": {
          "hot_value": {
            "desc": "热度值",
            "desc_en": "Heat value"
          },
          "item_id": {
            "desc": "热点词条唯一 ID",
            "desc_en": "Topic item unique ID"
          },
          "text": {
            "desc": "热点词条文本",
            "desc_en": "Trending topic text"
          },
          "url_scheme": {
            "desc": "跳转链接",
            "desc_en": "Landing URL"
          }
        }
      }
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 1,
    "total": 1,
    "total_pages": 1,
    "has_next": false,
    "has_prev": false
  }
}

错误码 ​

分页参数错误使用 HTTP 400 返回 {"error", "message"},不使用统一信封:

HTTP 状态error说明
400invalid_pagepage 不是正整数
400invalid_page_sizepage_size 不是正整数
400page_size_too_largepage_size 超过上限 20
400page_out_of_range存在匹配项且请求的 page 大于 total_pages
json
{
  "error": "page_size_too_large",
  "message": "page_size must be <= 20 (got 21)"
}
json
{
  "error": "page_out_of_range",
  "message": "page 2 exceeds total_pages 1"
}

限频或访问策略错误使用 HTTP 200 返回 ret_code、ret_msg 与 error:

ret_codeerror.code说明
-9permission_denied当前访问策略拒绝
-11rate_limited请求频率超出限制;若返回 Retry-After,按其秒数退避
-13quota_unavailable限频依赖暂时不可用

说明 ​

  • 当 keyword 无匹配项(total=0)时,即使 page 大于 1 也返回 HTTP 200,其中 apis 为空数组、total_pages 为 0、has_next 和 has_prev 均为 false。