TY 太一数据 OneShare 接口文档

指数专题

指数基本资料

查询指数基本资料信息

版本 1 更新于 2026-07-16 18:19

接口基本信息

  • 接口名称: get_index_basic_info
  • 功能描述: 查询指数基本资料信息(简称、全称、加权方式、发布机构等)
  • 数据更新频率: 静态数据
  • 请求方法: POST
  • API 路径: https://api.wanxingai.com/openapi/get_index_basic_info/

输入参数说明

参数名 类型 必选 描述 示例
index_code str 指数代码,多个用英文逗号分隔 000001.SH,399001.SZ

返回数据说明

字段名 类型 描述
code str 指数代码
data array 指标数组
index_short_name_index str 指数简称
index_full_name_index str 指数全称
index_introduction_index str 指数简介
wgt_method_index str 加权方式
index_code_index str 指数代码
index_category_index str 指数类别
publish_org_index str 发布机构
trade_currency_index str 交易币种

使用示例

import requests

url = "https://api.wanxingai.com/openapi/get_index_basic_info/"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer sk-********"
}
payload = {"index_code": "000001.SH,399001.SZ"}

resp = requests.post(url, json=payload, headers=headers)
print(resp.json())
import java.net.http.*;
import java.net.URI;

HttpClient client = HttpClient.newHttpClient();
String json = """
    {"index_code": "000001.SH,399001.SZ"}
    """;

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.wanxingai.com/openapi/get_index_basic_info/"))
    .header("Content-Type", "application/json")
    .header("Authorization", "Bearer sk-********")
    .POST(HttpRequest.BodyPublishers.ofString(json))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
curl -X POST https://api.wanxingai.com/openapi/get_index_basic_info/ \\
  -H "Content-Type: application/json" \\
  -H "Authorization: Bearer sk-********" \\
  -d '{"index_code": "000001.SH,399001.SZ"}'

输入参数说明

参数名 类型 必选 描述
无参数

返回数据说明

字段名 类型 描述
name str 指数名称(如"上证指数")
code str 指数代码(含交易所后缀,如 000001.SH)