Get Followed Companies
curl --request GET \
--url https://api.reportify.cn/v1/tools/user/followed-companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/tools/user/followed-companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/tools/user/followed-companies', 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/tools/user/followed-companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/tools/user/followed-companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/tools/user/followed-companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/tools/user/followed-companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"companies": [],
"total": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}账号关注
Get Followed Companies
Get all companies followed by a user
GET
/
v1
/
tools
/
user
/
followed-companies
Get Followed Companies
curl --request GET \
--url https://api.reportify.cn/v1/tools/user/followed-companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/tools/user/followed-companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/tools/user/followed-companies', 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/tools/user/followed-companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/tools/user/followed-companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/tools/user/followed-companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/tools/user/followed-companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"companies": [],
"total": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}获取用户关注的公司
URL:/v1/tools/user/followed-companies方法:
GET描述: 获取当前用户关注的所有公司列表。
请求参数
无需参数。响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| companies | array | 关注的公司列表 |
| symbol | string | 股票代码(如 US:AAPL) |
| ticker | string | 股票简码(如 AAPL) |
| market | string | 市场(如 US, HK, CN) |
| name | string | 公司名称 |
| chinese_name | string | 中文名称 |
| english_name | string | 英文名称 |
| logo | string | 公司 Logo URL |
| followed_at | integer | 关注时间戳(毫秒) |
| total | integer | 关注公司总数 |
请求示例
cURLcurl -X GET "https://api.reportify.cn/v1/tools/user/followed-companies" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
url = "https://api.reportify.cn/v1/tools/user/followed-companies"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
for company in data["companies"]:
print(f"{company['name']} ({company['symbol']})")
const response = await fetch(
'https://api.reportify.cn/v1/tools/user/followed-companies',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(`Total followed companies: ${data.total}`);
响应示例
{
"companies": [
{
"symbol": "US:AAPL",
"ticker": "AAPL",
"market": "US",
"name": "Apple Inc.",
"chinese_name": "苹果公司",
"english_name": "Apple Inc.",
"logo": "https://example.com/logos/aapl.png",
"followed_at": 1704067200000
},
{
"symbol": "HK:00700",
"ticker": "00700",
"market": "HK",
"name": "腾讯控股",
"chinese_name": "腾讯控股",
"english_name": "Tencent Holdings Ltd",
"logo": "https://example.com/logos/tencent.png",
"followed_at": 1704153600000
}
],
"total": 2
}
错误响应
| 状态码 | 描述 |
|---|---|
| 422 | 请求参数验证失败 |
使用场景
-
获取用户关注列表
- 用于展示用户关注的所有公司
- 构建个性化看板
-
与时间线接口配合使用
- 先获取关注公司,再查询相关动态
⌘I
