Index Tracking Funds
curl --request POST \
--url https://api.reportify.cn/v1/stock/index-tracking-funds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "000300"
}
'import requests
url = "https://api.reportify.cn/v1/stock/index-tracking-funds"
payload = { "symbol": "000300" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbol: '000300'})
};
fetch('https://api.reportify.cn/v1/stock/index-tracking-funds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/stock/index-tracking-funds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '000300'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/stock/index-tracking-funds"
payload := strings.NewReader("{\n \"symbol\": \"000300\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/stock/index-tracking-funds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"000300\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/stock/index-tracking-funds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"000300\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"code": 123,
"message": "<string>",
"data": {}
}{
"status": 123,
"code": 123,
"message": "<string>"
}{
"status": 123,
"code": 123,
"message": "<string>"
}{
"status": 123,
"code": 123,
"message": "<string>"
}指数和行业
Index Tracking Funds
Get list of funds that track a specific index. Returns fund names, short names, and fund codes for all tracking funds of the given index
POST
/
v1
/
stock
/
index-tracking-funds
Index Tracking Funds
curl --request POST \
--url https://api.reportify.cn/v1/stock/index-tracking-funds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "000300"
}
'import requests
url = "https://api.reportify.cn/v1/stock/index-tracking-funds"
payload = { "symbol": "000300" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbol: '000300'})
};
fetch('https://api.reportify.cn/v1/stock/index-tracking-funds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/stock/index-tracking-funds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '000300'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/stock/index-tracking-funds"
payload := strings.NewReader("{\n \"symbol\": \"000300\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/stock/index-tracking-funds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"000300\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/stock/index-tracking-funds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"000300\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"code": 123,
"message": "<string>",
"data": {}
}{
"status": 123,
"code": 123,
"message": "<string>"
}{
"status": 123,
"code": 123,
"message": "<string>"
}{
"status": 123,
"code": 123,
"message": "<string>"
}查询指数跟踪基金
URL:/v1/stock/index-tracking-funds方法:
POST描述: 根据指数代码查询跟踪该指数的基金列表。
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| symbol | string | 是 | 指数代码 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| status | integer | HTTP 状态码 |
| code | integer | 业务状态码 |
| message | string | 响应消息 |
| data | object | 响应数据 |
data 对象结构
| 参数名 | 类型 | 描述 |
|---|---|---|
| items | array | 基金列表 |
基金对象结构
| 参数名 | 类型 | 描述 |
|---|---|---|
| symbol | string | 基金代码 |
| short_name | string | 基金简称 |
| name | string | 基金全称 |
示例代码
cURL 示例
curl -X POST "https://api.reportify.cn/v1/stock/index-tracking-funds" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbol": "000300"
}'
Python 示例
import requests
url = "https://api.reportify.cn/v1/stock/index-tracking-funds"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"symbol": "000300"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(f"状态码: {result['status']}")
print(f"跟踪基金数量: {len(result['data']['items'])}")
for item in result['data']['items'][:5]: # 打印前5个
print(f"基金代码: {item['symbol']}, 简称: {item['short_name']}")
TypeScript 示例
const response = await fetch('https://api.reportify.cn/v1/stock/index-tracking-funds', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: '000300'
})
});
const result = await response.json();
console.log(`跟踪基金数量: ${result.data.items.length}`);
响应示例
成功响应
{
"status": 200,
"code": 0,
"message": "",
"data": {
"items": [
{
"symbol": "510300",
"short_name": "沪深300ETF",
"name": "华泰柏瑞沪深300交易型开放式指数证券投资基金"
},
{
"symbol": "159919",
"short_name": "沪深300ETF",
"name": "嘉实沪深300交易型开放式指数证券投资基金"
},
{
"symbol": "510310",
"short_name": "沪深300ETF易方达",
"name": "易方达沪深300交易型开放式指数发起式证券投资基金"
}
]
}
}
成功响应(无数据)
{
"status": 200,
"code": 0,
"message": "",
"data": {
"items": []
}
}
常用指数代码
| 指数代码 | 指数名称 |
|---|---|
| 000300 | 沪深300 |
| 000016 | 上证50 |
| 000905 | 中证500 |
| 399006 | 创业板指 |
| 000852 | 中证1000 |
注意事项
- symbol 参数:指数代码,如沪深300的代码为
000300 - 空响应:如果
data.items为空数组,说明没有找到跟踪该指数的基金 - 基金类型:返回的基金包括 ETF、LOF、场外指数基金等各类跟踪基金
Authorizations
Enter your Bearer token
Body
application/json
Input schema for index tracking funds query
Index symbol
Example:
"000300"
⌘I
