> For the complete documentation index, see [llms.txt](https://docscn.jkidata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docscn.jkidata.com/cai-wu-shu-ju/ipo-lie-biao-jie-kou-ipo-listing.md).

# 🏛 IPO 列表接口（IPO Listing）

## 🏛 IPO 列表接口（IPO Listing）

获取指定国家的 IPO 与上市公司信息，包括公司名称、产品代码、申购日期、上市日期、发行价格、发行规模、每手数量和交易所等数据。

### 接口信息

```
GET /ipo_listing
```

> 本页面使用相对路径。API 基础地址请参考「财务数据」首页。

### 请求参数

| 参数        | 类型     | 必填 | 示例             | 说明       |
| --------- | ------ | -- | -------------- | -------- |
| `country` | string | 是  | `india`        | 国家代码     |
| `key`     | string | 是  | `YOUR_API_KEY` | API 访问密钥 |

### 支持的国家

| 参数值       | 国家或地区 |
| --------- | ----- |
| `america` | 美国    |
| `india`   | 印度    |
| `japan`   | 日本    |

> 国家代码使用小写字母。后续新增支持范围时，以「市场 / 国家 / 语言参数说明」页面为准。

### 请求示例

```
GET /ipo_listing?country=india&key=YOUR_API_KEY
```

#### cURL

```
curl --request GET \
  "$JKIDATA_BASE_URL/ipo_listing?country=india&key=$JKIDATA_API_KEY"
```

#### Python

```
import requests

url = f"{JKIDATA_BASE_URL}/ipo_listing"

params = {
    "country": "india",
    "key": JKIDATA_API_KEY,
}

response = requests.get(url, params=params, timeout=15)
response.raise_for_status()

result = response.json()

for item in result.get("data", []):
    print(
        item.get("name"),
        item.get("symbol"),
        item.get("listingDate"),
        item.get("exchange"),
    )
```

#### JavaScript

```
const params = new URLSearchParams({
  country: "india",
  key: process.env.JKIDATA_API_KEY,
});

const response = await fetch(
  `${process.env.JKIDATA_BASE_URL}/ipo_listing?${params}`
);

if (!response.ok) {
  throw new Error(`HTTP ${response.status}`);
}

const result = await response.json();

for (const item of result.data ?? []) {
  console.log(
    item.name,
    item.symbol,
    item.listingDate,
    item.exchange
  );
}
```

### 成功响应示例

```
{
  "status": 0,
  "message": "SUCCESS",
  "data": [
    {
      "id": 10001,
      "country": "india",
      "name": "Example Company Limited",
      "symbol": null,
      "openDate": "2026-08-10",
      "closeDate": "2026-08-12",
      "listingDate": "2026-08-18",
      "issuePrice": "100-105",
      "issueSize": 50000000,
      "lotSize": 100,
      "exchange": "NSE",
      "weight": 0,
      "createTime": "2026-08-09 08:00:00",
      "remarks": null
    }
  ]
}
```

> 响应示例仅用于说明数据结构，不代表真实公司或当前 IPO 数据。实际响应可能包含其他字段。

### 响应结构

| 字段        | 类型     | 说明                |
| --------- | ------ | ----------------- |
| `status`  | number | 业务状态码，`0` 表示请求成功  |
| `message` | string | 请求结果说明            |
| `data`    | array  | IPO 数据列表          |
| `total`   | number | 数据总数；部分响应可能返回 `0` |
| `page`    | number | 当前页码；不分页时可能返回 `0` |

### `data` 字段说明

| 字段            | 类型                     | 说明                   |
| ------------- | ---------------------- | -------------------- |
| `id`          | number / string        | IPO 记录的唯一标识          |
| `country`     | string                 | 所属国家                 |
| `name`        | string                 | 公司名称                 |
| `symbol`      | string / null          | 产品代码；尚未确定时可能为 `null` |
| `openDate`    | string / null          | IPO 开始日期             |
| `closeDate`   | string / null          | IPO 结束日期             |
| `listingDate` | string / null          | 预计或实际上市日期            |
| `issuePrice`  | string / number / null | 发行价格或发行价格区间          |
| `issueSize`   | number / null          | 发行规模                 |
| `lotSize`     | number / null          | 每手或最小申购数量            |
| `exchange`    | string / null          | 上市交易所                |
| `weight`      | number / null          | 排序权重或内部权重            |
| `createTime`  | string / null          | 数据创建时间               |
| `remarks`     | string / null          | 备注信息                 |

### 空值处理

部分 IPO 在早期阶段可能尚未确定产品代码、发行价格或上市日期，对应字段可能返回空字符串或 `null`。

#### JavaScript

```
const symbol = item.symbol || "待确定";
const listingDate = item.listingDate || "待公布";
const issuePrice = item.issuePrice || "待公布";
```

#### Python

```
symbol = item.get("symbol") or "待确定"
listing_date = item.get("listingDate") or "待公布"
issue_price = item.get("issuePrice") or "待公布"
```

### 与行情接口联动

当 IPO 数据已经提供 `exchange` 和 `symbol` 时，可以使用这两个字段查询实时报价：

```
/quote?exchange={exchange}&symbol={symbol}&key=YOUR_API_KEY
```

如果 `symbol` 为空，请等待产品代码公布后再请求行情数据。

### 注意事项

* `country` 必须使用接口支持的小写国家代码。
* 本接口不需要传入 `exchange`，交易所信息由响应字段返回。
* IPO 信息可能因发行安排变化而调整，请以最新响应为准。
* `symbol`、`listingDate`、`issuePrice`、`issueSize` 和 `lotSize` 均可能为空。
* 日期字段当前以字符串返回，客户端应自行处理格式和时区。
* 返回数组可能较大，请避免短时间内高频重复请求。
* 请勿在前端代码或公共代码仓库中暴露真实 API Key。
