行業排行榜
按市場和指標獲取行業排行榜。返回的 Counter ID 可直接傳入 industry_peers 查詢子行業樹。
SDK Links
Python | longport.openapi.FundamentalContext.industry_rank |
Rust | longport::fundamental::FundamentalContext#industry_rank |
Go | FundamentalContext.IndustryRank |
Node.js | FundamentalContext#industryRank |
Parameters
SDK 方法參數。
| Name | Type | Required | Description |
|---|---|---|---|
| market | string | 是 | 市場代碼:US / HK / CN / SG |
| indicator | string | 是 | 排行指標:leading-gainer / today-trend / popularity / market-cap / revenue / revenue-growth / net-profit / net-profit-growth |
| sort_type | string | 是 | 排序方式:single(單一排序)/ multi(多維排序) |
| limit | uint32 | 是 | 返回條數,預設 20 |
Request Example
Response
Response Example
json
{
"code": 0,
"message": "success",
"data": {
"items": [
{
"lists": [
{
"name": "Technology",
"counter_id": "BK/US/IN00258",
"chg": "0.0231",
"leading_name": "NVIDIA",
"leading_ticker": "NVDA.US",
"leading_chg": "0.0512",
"value_name": "",
"value_data": ""
}
]
}
]
}
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | 成功 | IndustryRankResponse |
| 400 | 請求錯誤 | None |
Schemas
IndustryRankResponse
| Name | Type | Required | Description |
|---|---|---|---|
| items | object[] | 否 | 排行分組列表 |
| ∟ lists | object[] | 否 | 行業條目列表 |
| ∟ ∟ name | string | 否 | 行業名稱 |
| ∟ ∟ counter_id | string | 否 | 行業唯一標識(BK/市場/ID 格式),可直接傳入 industry_peers |
| ∟ ∟ chg | string | 否 | 當日漲跌幅(小數) |
| ∟ ∟ leading_name | string | 否 | 漲幅領先個股名稱 |
| ∟ ∟ leading_ticker | string | 否 | 漲幅領先個股代碼 |
| ∟ ∟ leading_chg | string | 否 | 漲幅領先個股漲跌幅(小數) |
| ∟ ∟ value_name | string | 否 | 指標名稱(按指標類型填充,可能為空) |
| ∟ ∟ value_data | string | 否 | 指標數值(可能為空) |