# REST API

- [HTTP 请求示例](https://apis.alltick.co/rest-api/http-request-example.md): HTTP 请求示例
- [HTTP接口API](https://apis.alltick.co/rest-api/stock-http-interface-api.md): GET 单产品历史K线查询（最高、最低、开盘、收盘价） GET 最新盘口(最新深度、Order Book)查询 GET 最新成交价(最新tick、当前价、最新价)批量查询 POST 批量查询产品最新2根K线（最高、最低、开盘、收盘价） GET 股票产品基础信息批量查询
- [GET 单产品历史K线查询（最高、最低、开盘、收盘价）](https://apis.alltick.co/rest-api/stock-http-interface-api/get-dan-chan-pin-li-shikxian-cha-xun.md): 该接口可用来查询历史k线，但每次只能查询一个产品，建议将查询到的历史K线缓存本地数据库。 使用HTTP接口获取K线的客户，建议将/kline和/batch-kline这2个接口结合使用,步骤如下： 首先，通过 /kline 接口轮询请求历史数据并存储到本地数据库，后续历史数据可直接从客户的数据库获取，无需再通过接口请求。 然后，后续持续使用 /batch-kline 接口批量请求多个产品的最新2根
- [POST 批量查询产品最新2根K线（最高、最低、开盘、收盘价）](https://apis.alltick.co/rest-api/stock-http-interface-api/post-pi-liang-cha-xun-chan-pin-zui-xin-2-genkxian.md): 该接口可以一次性批量查询多个产品，且可批量一次性查询多个k线类型（k线类型指的是1分钟，15分钟，30分钟等），但只能批量查询最新的2根k线。 使用HTTP接口获取K线的客户，建议将/kline和/batch-kline这2个接口结合使用,步骤如下： 首先，通过 /kline 接口轮询请求历史数据并存储到本地数据库，后续历史数据可直接从客户的数据库获取，无需再通过接口请求。 然后，后续持续使用
- [GET 最新盘口(最新深度、Order Book)查询](https://apis.alltick.co/rest-api/stock-http-interface-api/get-latest-handicap-quotation-query.md): 以下是每类产品最大的盘口深度： 1、不活跃的产品存在小于下面列的最大档的情况，属于正常情况 2、存在单边深度是空的情况，例如股票涨停跌停时，单边盘口可能是空的
- [GET 最新成交价(最新tick、当前价、最新价)批量查询](https://apis.alltick.co/rest-api/stock-http-interface-api/get-latest-transaction-price-query.md): 接口说明 该接口支持批量请求产品的最新成交价(最新逐笔Tick数据、也是当前价、最新价)，不支持请求历史成交价(历史逐笔tick数据)。
- [GET 股票产品基础信息批量查询](https://apis.alltick.co/rest-api/stock-http-interface-api/get-latest-transaction-price-query-1.md): 接口说明 该接口仅支持批量请求美股、港股、A股产品的部分基础信息。 请求频率
- [GET 停复牌信息查询接口](https://apis.alltick.co/rest-api/stock-http-interface-api/get-latest-transaction-price-query-1-1.md): 接口说明 该接口仅支持批量请求美股、港股、A股产品的部分基础信息。 请求频率
- [涨跌幅、休市、假期、涨停跌停、新股上市和退市](https://apis.alltick.co/rest-api/stock-http-interface-api/get-latest-transaction-price-query-1-2.md): 涨跌幅说明 Alltick的接口不提供涨跌幅或24小时涨跌幅字段。客户可以通过获取Alltick的数据自行计算涨跌幅。 每日涨跌幅计算方法： 方法一：使用HTTP接口获取当天的日K线收盘价和前一日的日K线收盘价，计算公式如下： 涨跌幅 = (当天收盘价 - 前一日收盘价) / 前一日收盘价 \* 100% 方法二：使用WebSocket接口获取最新价格，并通过HTTP接口获取前一日的日K线收盘价，


---

# 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://apis.alltick.co/rest-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.
