# 日本股票实时行情接口

## 1. 获取日本股票清单

Infoway API 支持查询总计约3800只日本股票。您可以通过以下两种方式获取股票清单：

* **下载清单文件**：登录您的账户后台，在底部找到文件下载链接。
* **通过HTTP接口查询**：如需通过接口获取股票清单，请参考[GET查询产品列表](https://docs.infoway.io/rest-api/basic-info/get-symbol-list)。

{% hint style="info" %}
股票清单将定期更新，新增新上市的股票，并移除已退市的股票。为了确保获取最新的市场信息，建议您定期查看清单。
{% endhint %}

## 2. 查询方式

我们为不同需求的用户提供两种高效的查询方式：

| 查询方式        | 适用场景                                                               |
| ----------- | ------------------------------------------------------------------ |
| HTTP接口      | 适用于定期或批量查询的用户，支持灵活的查询请求。通过HTTP接口，您可以查询A股上市公司的基础信息、历史行情、实时K线、盘口等数据。 |
| WebSocket订阅 | 适合用于获取快速更新的实时行情数据，确保您获取最低延迟的行情推送。                                  |

{% hint style="info" %}
HTTP或者WebSocket均对查询频率有限制，详细限制说明请见[此页面](https://docs.infoway.io/getting-started/api-limitation)。
{% endhint %}

## 3. 支持的数据类型

Infoway日股实时行情接口提供以下几种数据查询服务：

### 3.1 获取日本股票的实时K线数据

提供实时的日股股票K线数据，包括开盘、最高、最低、收盘价格、成交量、成交额、涨跌幅、涨跌额，帮助用户捕捉市场走势。详细了解如何获取K线，请前往

* [HTTP请求K线](https://docs.infoway.io/rest-api/http-endpoints/get-candles)
* [WebSocket订阅K线](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe/candles-subscribe)。

日股 (丰田汽车 `7203.JP`)实时K线返回示例如下：

```
{
  "s": "7203.JP",    //股票代码
  "respList": [
    {
      "t": "1773032040",  //秒时间戳（UTC+8）
      "h": "3349.0",    //最高价
      "o": "3348.0",    //开盘价
      "l": "3347.0",    //最低价
      "c": "3349.00",    //收盘价
      "v": "23100.0",    //成交量
      "vw": "77352800.00",    //成交额
      "pc": "0.03%",    //涨跌幅
      "pca": "1.00"    //涨跌额
    }
  ]
}
```

### 3.2 日**股实时成交明细**

查询日股上市公司的最新成交明细，确保获取市场的最新交易信息。详细接入方法请前往：

* [GET实时成交明细](https://docs.infoway.io/rest-api/http-endpoints/get-trade)
* [WebSocket订阅成交明细](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe/trade-subscribe)

实时成交明细返回示例如下：

```
{
  "s": "7203.JP",    //股票代码
  "t": 1773030789341,    //毫秒时间戳(UTC+8)
  "p": "3357.0",    //交易价格
  "v": "2500.0",    //成交量
  "vw": "8392500.00",    //成交额
  "td": 0    //交易方向 1：BUY 2：SELL 0：默认值
}
```

### 3.3 日股一档**盘口数据**

实时提供一档买卖盘数据，帮助用户了解市场深度和流动性。详细接入步骤请前往：

* [GET查询盘口数据](https://docs.infoway.io/rest-api/http-endpoints/get-depth)
* [WebSocket订阅盘口数据](https://docs.infoway.io/websocket-api/subscribe-and-unsubscribe/depth-subscribe)

日股一档盘口返回示例如下：

```
{
  "s": "7203.JP",    //股票代码 
  "t": 1773031148913,    //毫秒时间戳(UTC+8)
  "a": [    //买盘
    [
      "3356.0",    //买一价
    ],
    [
      "5800.0",    //买一量
    ]
  ],
  "b": [    //卖盘
    [
      "3354.0",    //卖一价
    ],
    [
      "6800.0",    //卖一量
    ]
  ]
}

```

### 3.4 日**股股票基础信息**

查询日股上市公司的基础信息，包括公司名称、股票代码、上市日期等。详细了解接入步骤，请前往[这个页面](https://docs.infoway.io/rest-api/basic-info/get-symbol-basic-info)。

日股（丰田汽车 7203.JP）股票基础信息返回示例如下：

```
{
  "ret": 200,
  "msg": "success",
  "traceId": "d9e8f29a-c4f4-411b-b4a6-737a36fb2d37",
  "data": [
    {
      "symbol": "7203.JP",
      "market": "JP",
      "name_cn": "",
      "name_en": "Toyota Motor Corp.",
      "name_hk": "",
      "exchange": "TSE",
      "currency": "JPY",
      "lot_size": null,
      "total_shares": null,
      "circulating_shares": null,
      "hk_shares": null,
      "eps": "283.4305",
      "eps_ttm": null,
      "bps": null,
      "dividend_yield": "0.0272910083309394",
      "stock_derivatives": null,
      "board": "Consumer Durables"
    }
  ]
}
```

### 3.5 日本**股市交易日、交易时间**

查询日本市场的交易日和交易时间，包括开盘时间、收盘时间等，以确保用户了解每个交易日的市场活动周期。查询方法：

* [查询交易时间](https://docs.infoway.io/rest-api/basic-info/get-market-trading-hours)
* [查询交易日](https://docs.infoway.io/rest-api/basic-info/get-market-trading-days)

交易时间返回示例如下：

```
{
  "market": "JP",
  "remark": "日本股市",
  "trade_schedules": [
    {
      "begin_time": "09:00:00",
      "end_time": "11:30:00",
      "type": "NormalTrade"
    },
    {
      "begin_time": "12:30:00",
      "end_time": "15:00:00",
      "type": "NormalTrade"
    }
  ]
}

```

交易日返回示例：

```
{
  "trade_days": [
    "20260202",
    "20260203",
    "20260204",
    "20260205",
    "20260206",
    "20260209",
    "20260210"
  ],
  "half_trade_days": []
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infoway.io/readme/other-stock-markets/japan-realtime-stock-market-data-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
