---
title: "批量行情（多只一次取）"
method: GET
path: "/v1/quote-batch"
tags: ["pro"]
---

# 批量行情（多只一次取）

`GET /v1/quote-batch`

## Request

- Base URL: `https://api.ashareapi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ashareapi.com/v1/quote-batch`
- Auth: none declared

⭐ **一次拿多只股票的行情**，**逐只标明成功与否** —— 给量化/批量研究用。

**它解决什么**：自己写循环取 300 只 = 300 次请求 × 约 0.7 秒 ≈ **3.5 分钟**（还会撞限频退避）；本端点实测 **4.16 秒**拿完沪深300 全 300 只。

**用法**：`codes` 用**逗号分隔**，如 `?codes=sh600519,sz000001,sz300750`；支持裸 6 位码（`600519`）与带前缀（`sh600519`）。

**返回**：`data` 是数组，每项 `{code, ok, data}`（或 `error`）—— **取了几只就回几个条目**，缺失的显式标 `ok:false` 并给原因；同时给 `requested` / `returned` / `failed` 计数。

⚠️ **与 `/v1/quote` 的区别**：`/v1/quote` 的 `code` 虽也支持逗号，但返回是**扁平行且不带逐只状态**（缺了哪只要自己算）；本端点**逐只回填**，缺谁一眼可见。

**上限**：专业版单次最多 **200** 只，不限量版 **1000** 只（一次判 300 只 4.16 秒实测可跑通）。**计费按实际返回只数**（失败的不计）。

⚠️ `period` 默认 `day`；`count` 默认 **1**（只取最新一条，最省）。要 N 天历史就传 `count=N`（**每只各 N 条**，实测 3 只 × 30 = 90 行）。

⚠️ 换手率字段名是 **`turnover`**（%，与 `/v1/quote` 同名同值）。

⚠️ **付费端点**：**专业版（¥99）及以上**，标准版不可用。

## Query parameters

- `codes` string, required: 多个股票代码，逗号分隔：sh600519,sz000001,sz300750
- `period` string: 周期：day/week/month/season/year 或 m1~m120
- `count` integer: 每只返回几条，默认 1（只取最新）
- `start` string: 起始日期 YYYY-MM-DD（可选）
- `end` string: 结束日期 YYYY-MM-DD（可选）

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ashareapi/apis/a-api.md) · [All operations](https://skmtc.dev/ashareapi/apis/a-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ashareapi/apis/a-api/revisions/fc57bdcb13d5?raw)
