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>'
{
  "companies": [],
  "total": 0
}

获取用户关注的公司

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