# GET Sector Data

### Description

This group of endpoints provides sector-level data, including industry sector lists, concept sector lists, sector constituent queries, and AI-generated industry analysis.

### Rate Limit

Shares the same rate limit with other endpoints. Refer to [API Rate Limits](https://docs.infoway.io/getting-started/api-limitation).

### Error Codes

Refer to [HTTP Error Codes](https://docs.infoway.io/getting-started/error-codes/http).

### Request Headers

| Parameter | Type   | Required | Description  |
| --------- | ------ | -------- | ------------ |
| `apiKey`  | String | Yes      | Your API Key |

### Sector Code Format

| Type            | Format                | Example                          |
| --------------- | --------------------- | -------------------------------- |
| Industry Sector | `IN{digits}.{market}` | `IN20293.HK` (Diversified Banks) |
| Concept Sector  | `CP{digits}.{market}` | `CP20027.HK` (Biotech B-shares)  |

### Supported Markets

`HK` (Hong Kong), `US` (United States), `CN` (China A-shares), `SG` (Singapore)

***

#### Industry Sector List

Get all industry sectors for a given market.

**Endpoint**

* Base path: `/common/v2/basic/plate/industry/{market}`
* Full path: `https://data.infoway.io/common/v2/basic/plate/industry/{market}`

**Path Parameters**

| Parameter | Type   | Required | Description | Example |
| --------- | ------ | -------- | ----------- | ------- |
| `market`  | String | Yes      | Market code | `HK`    |

**Query Parameters**

| Parameter | Type    | Required | Description                           | Example |
| --------- | ------- | -------- | ------------------------------------- | ------- |
| `limit`   | Integer | No       | Number of results, 1-300, default 200 | `200`   |

**Response Example**

```json
{
  "market": "HK",
  "count": 5,
  "data": [
    {
      "symbol": "IN20335.HK",
      "counter_id": "BK/HK/IN20335",
      "name": "Security and Alarm Services",
      "type": "industry",
      "chg": "0.0615",
      "last_done": "490.292",
      "change": "28.417",
      "rise": "1",
      "fall": "0",
      "total_amount": "3740100",
      "market_cap": "715513802"
    }
  ]
}
```

| Field          | Type   | Description                         |
| -------------- | ------ | ----------------------------------- |
| `symbol`       | String | Sector code                         |
| `counter_id`   | String | Internal traceability ID            |
| `name`         | String | Sector name                         |
| `type`         | String | Sector classification               |
| `chg`          | String | Overall price change percentage     |
| `last_done`    | String | Current sector point (latest price) |
| `change`       | String | Change in points                    |
| `rise`         | String | Number of advancing stocks          |
| `fall`         | String | Number of declining stocks          |
| `total_amount` | String | Trading amount                      |
| `market_cap`   | String | Total market capitalization         |

***

#### Concept Sector List

Get concept/trending sectors for a given market.

**Endpoint**

* Base path: `/common/v2/basic/plate/concept/{market}`
* Full path: `https://data.infoway.io/common/v2/basic/plate/concept/{market}`

**Path Parameters**

| Parameter | Type   | Required | Description | Example |
| --------- | ------ | -------- | ----------- | ------- |
| `market`  | String | Yes      | Market code | `HK`    |

**Query Parameters**

| Parameter | Type    | Required | Description                           | Example |
| --------- | ------- | -------- | ------------------------------------- | ------- |
| `limit`   | Integer | No       | Number of results, 1-100, default 100 | `100`   |

**Response Example**

```json
{
  "market": "HK",
  "count": 3,
  "data": [
    {
      "symbol": "CP20027.HK",
      "counter_id": "BK/HK/CP20027",
      "name": "Biotech B-shares",
      "chg": "0.0736",
      "intro": "Biotech companies listed under HKEX Chapter 18A"
    }
  ]
}
```

| Field        | Type   | Description          |
| ------------ | ------ | -------------------- |
| `symbol`     | String | Sector code          |
| `counter_id` | String | Sector ID            |
| `name`       | String | Concept name         |
| `chg`        | String | Price change ratio   |
| `intro`      | String | Concept introduction |

***

#### Sector Constituents

Get all constituent stocks of a given industry or concept sector, with pagination.

**Endpoint**

* Base path: `/common/v2/basic/plate/members/{plate_symbol}`
* Full path: `https://data.infoway.io/common/v2/basic/plate/members/{plate_symbol}`

**Path Parameters**

| Parameter      | Type   | Required | Description                                                         | Example      |
| -------------- | ------ | -------- | ------------------------------------------------------------------- | ------------ |
| `plate_symbol` | String | Yes      | Sector code, format: `IN{digits}.{market}` or `CP{digits}.{market}` | `IN20293.HK` |

**Query Parameters**

| Parameter | Type    | Required | Description                        | Example |
| --------- | ------- | -------- | ---------------------------------- | ------- |
| `offset`  | Integer | No       | Pagination offset, default 0       | `0`     |
| `limit`   | Integer | No       | Results per page, 1-50, default 50 | `50`    |

**Response Example**

```json
{
  "plate": "IN20293.HK",
  "counter_id": "BK/HK/IN20293",
  "data": {
    "total": 18,
    "offset": 0,
    "limit": 50,
    "members": [
      {"symbol": "1988.HK", "name": "Minsheng Bank", "last_done": "3.870", "chg": "0.0104"},
      {"symbol": "1658.HK", "name": "PSBC", "last_done": "4.960", "chg": "0.0102"},
      {"symbol": "939.HK", "name": "CCB", "last_done": "8.090", "chg": "0.0100"}
    ]
  }
}
```

| Field         | Type    | Description            |
| ------------- | ------- | ---------------------- |
| `total`       | Integer | Total constituents     |
| `offset`      | Integer | Current offset         |
| `limit`       | Integer | Current page size      |
| `members`     | Array   | Constituent stock list |
| `> symbol`    | String  | Symbol code            |
| `> name`      | String  | Stock name             |
| `> last_done` | String  | Latest price           |
| `> chg`       | String  | Price change ratio     |

***

#### Industry Introduction

Get AI-generated industry analysis report.

**Endpoint**

* Base path: `/common/v2/basic/plate/intro/{plate_symbol}`
* Full path: `https://data.infoway.io/common/v2/basic/plate/intro/{plate_symbol}`

**Path Parameters**

| Parameter      | Type   | Required | Description | Example      |
| -------------- | ------ | -------- | ----------- | ------------ |
| `plate_symbol` | String | Yes      | Sector code | `IN20293.HK` |

**Response Example**

```json
{
  "plate": "IN20293.HK",
  "intro": "Diversified Banks include large banking institutions providing a wide range of financial services. These banks typically have extensive branch networks in Hong Kong and internationally..."
}
```

| Field   | Type   | Description                    |
| ------- | ------ | ------------------------------ |
| `plate` | String | Sector code                    |
| `intro` | String | AI-generated industry analysis |

***

#### Sector Heatmap Chart

Dedicated for frontend rendering of sector heatmaps or bubble distribution charts. It flattens and returns the market weight and market cap of each sector in the market.

**Endpoint**

* Base path: `/common/v2/basic/plate/chart/{market}`
* Full path: `https://data.infoway.io/common/v2/basic/plate/chart/{market}`

**Path Parameters**

| Parameter | Type   | Required | Description | Example |
| --------- | ------ | -------- | ----------- | ------- |
| `market`  | String | Yes      | Market code | `HK`    |

**Query Parameters**

| Parameter | Type    | Required | Description                    | Example |
| --------- | ------- | -------- | ------------------------------ | ------- |
| `limit`   | Integer | No       | Number of results, default 500 | `200`   |

**Response Example**

```json
{
  "market": "HK",
  "count": 2,
  "data": [
    {
      "symbol": "IN20293.HK",
      "counter_id": "BK/HK/IN20293",
      "name": "Diversified Banks",
      "type": "industry",
      "chg": "0.0064",
      "market_cap": "14777418247285",
      "market_weight": "0.1952"
    }
  ]
}
```

| Field           | Type   | Description                                        |
| --------------- | ------ | -------------------------------------------------- |
| `symbol`        | String | Sector code                                        |
| `name`          | String | Sector name                                        |
| `chg`           | String | Overall price change                               |
| `market_cap`    | String | Total market capitalization                        |
| `market_weight` | String | The market weight coefficient of this sector (0-1) |
