# 指数成分股

`GET` `/v1/quote/index-constituents`

获取指数或 ETF 的成分股列表，支持排序并显示涨跌统计。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | 指数或 ETF 代码，例如 `HSI.HK`、`SPY.US` |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/quote/index-constituents?symbol=<symbol>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `total` | integer | No | 满足条件的股票总数。 |
| `└ symbol` | string | No | 证券代码 |
| `└ trade_status` | integer | No | 交易状态码 |
| `└ last_done` | string | No | 最新价 |
| `└ prev_close` | string | No | 前收盘价 |
| `└ inflow` | string | No | 资金净流入 |
| `└ balance` | string | No | 市值 |
| `└ amount` | string | No | 成交额 |
| `└ total_shares` | string | No | 总股数 |
| `└ circulating_shares` | string | No | 流通股数 |
| `└ tags` | array | No | 标签 |
| `└ name` | string | No | 证券名称 |
| `└ market` | string | No | 市场 |
| `└ intro` | string | No | 简介 |
| `└ delay` | boolean | No | 是否为延迟数据 |
| `└ chg` | string | No | 涨跌幅 |
| `rise_num` | integer | No | 上涨数量 |
| `fall_num` | integer | No | 下跌数量 |
| `flat_num` | integer | No | 平盘数量 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "fall_num": 10,
    "flat_num": 3,
    "rise_num": 7,
    "stocks": [
      {
        "symbol": "9988.HK",
        "name": "BABA-W",
        "market": "HK",
        "last_done": "140.90",
        "prev_close": "132.80",
        "chg": "0.0610",
        "amount": "93828577",
        "inflow": "18483450",
        "balance": "13320299492",
        "circulating_shares": "19192403958",
        "total_shares": "19192403958",
        "trade_status": 105,
        "intro": "China's largest e-commerce platform",
        "delay": false,
        "tags": [
          "Top gainers"
        ]
      }
    ]
  }
}
```
