Skip to main content
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
描述: 获取当前用户关注的所有公司列表。

请求参数

无需参数。

响应参数

参数名类型描述
companiesarray关注的公司列表
  symbolstring股票代码(如 US:AAPL
  tickerstring股票简码(如 AAPL
  marketstring市场(如 US, HK, CN
  namestring公司名称
  chinese_namestring中文名称
  english_namestring英文名称
  logostring公司 Logo URL
  followed_atinteger关注时间戳(毫秒)
totalinteger关注公司总数

请求示例

cURL
curl -X GET "https://api.reportify.cn/v1/tools/user/followed-companies" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
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']})")
TypeScript
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请求参数验证失败

使用场景

  1. 获取用户关注列表
    • 用于展示用户关注的所有公司
    • 构建个性化看板
  2. 与时间线接口配合使用
    • 先获取关注公司,再查询相关动态

Authorizations

Authorization
string
header
required

Enter your Bearer token

Response

Successful Response

Response containing followed companies

companies
FollowedCompanyItem · object[]

List of followed companies

total
integer
default:0

Total number of followed companies