> ## Documentation Index
> Fetch the complete documentation index at: https://alltick.co/apis/llms.txt
> Use this file to discover all available pages before exploring further.

# REST 行情 API 地址说明

> AllTick REST 行情 API 的市场基础地址、资源路径及 X-API-Key 认证方式。

## API地址说明

REST 行情 API 使用 HTTPS 协议。根据产品类型选择基础地址，再拼接对应的 `/v1/...` 资源路径。REST API 使用 `X-API-Key` 请求头认证，不使用旧版 HTTP 行情 API 的 `token` 查询参数。

### 股票市场 REST 接口地址

适用于美股、港股、A股及大盘数据：

**基础地址：** `https://quote.alltick.co/quote-stock-b-api`

单产品 K 线请求地址示例：

```text theme={null}
GET https://quote.alltick.co/quote-stock-b-api/v1/kline/{queryData}
```

批量 K 线请求地址示例：

```text theme={null}
POST https://quote.alltick.co/quote-stock-b-api/v1/batch-kline
```

股票产品信息接口仅适用于美股、港股和A股，地址为 `https://quote.alltick.co/quote-stock-b-api/v1/stock-info`。

### 外汇、贵金属、加密货币等市场 REST 接口地址

适用于外汇、贵金属、加密货币、原油、CFD指数及商品：

**基础地址：** `https://quote.alltick.co/quote-b-api`

单产品 K 线请求地址示例：

```text theme={null}
GET https://quote.alltick.co/quote-b-api/v1/kline/{queryData}
```

批量 K 线请求地址示例：

```text theme={null}
POST https://quote.alltick.co/quote-b-api/v1/batch-kline
```

最新报价和最新盘口的完整地址如下：

| 产品类型                    | 最新报价                                                              | 最新盘口                                                              |
| ----------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| 美股、港股、A股、大盘数据           | `https://quote.alltick.co/quote-stock-b-api/v1/quote/{queryData}` | `https://quote.alltick.co/quote-stock-b-api/v1/depth/{queryData}` |
| 外汇、贵金属、加密货币、原油、CFD指数、商品 | `https://quote.alltick.co/quote-b-api/v1/quote/{queryData}`       | `https://quote.alltick.co/quote-b-api/v1/depth/{queryData}`       |

这两个接口均使用 GET 请求。GET 请求中的 `queryData` 应按接口要求编码后放入 URL 路径；批量 K 线等 POST 请求将请求数据放在 body 中。

### 停复牌信息接口地址

停复牌信息接口使用域名下的 `/v1/trading-status/...` 路径，**不拼接**上述市场基础路径：

```text theme={null}
GET https://quote.alltick.co/v1/trading-status/sse/{page}/{size}
GET https://quote.alltick.co/v1/trading-status/nyse/{page}/{size}
GET https://quote.alltick.co/v1/trading-status/nasdaq/{page}/{size}
```

### 认证方式

每次请求都需要在请求头中提供 API Key：

```http theme={null}
X-API-Key: YOUR_API_KEY
```

各接口的请求参数和返回内容请参阅 [REST API 文档](/apis/apis/zh/rest-api)，调用代码请参阅 [REST API 请求示例](/apis/apis/zh/rest-api/rest-request-example)。

***

#### 官方网站

<Note>
  官方网站：<a href="https://alltick.co/">[https://alltick.co/](https://alltick.co/)</a>
</Note>

<script src="/apis/seo-keywords.js" />
