Skip to main content
POST
/
v1
/
quant
/
quotes
/
kline
/
batch
Get batch kline data for multiple symbols
curl --request POST \
  --url https://api.reportify.cn/v1/quant/quotes/kline/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "symbols": [
    "<string>"
  ],
  "kline_type": "1D",
  "market": "cn",
  "stock_type": "stock",
  "start_datetime": "2023-11-07T05:31:56Z",
  "end_datetime": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://api.reportify.cn/v1/quant/quotes/kline/batch"

payload = {
"symbols": ["<string>"],
"kline_type": "1D",
"market": "cn",
"stock_type": "stock",
"start_datetime": "2023-11-07T05:31:56Z",
"end_datetime": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbols: ['<string>'],
kline_type: '1D',
market: 'cn',
stock_type: 'stock',
start_datetime: '2023-11-07T05:31:56Z',
end_datetime: '2023-11-07T05:31:56Z'
})
};

fetch('https://api.reportify.cn/v1/quant/quotes/kline/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/quant/quotes/kline/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbols' => [
'<string>'
],
'kline_type' => '1D',
'market' => 'cn',
'stock_type' => 'stock',
'start_datetime' => '2023-11-07T05:31:56Z',
'end_datetime' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.reportify.cn/v1/quant/quotes/kline/batch"

payload := strings.NewReader("{\n \"symbols\": [\n \"<string>\"\n ],\n \"kline_type\": \"1D\",\n \"market\": \"cn\",\n \"stock_type\": \"stock\",\n \"start_datetime\": \"2023-11-07T05:31:56Z\",\n \"end_datetime\": \"2023-11-07T05:31:56Z\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/quant/quotes/kline/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbols\": [\n \"<string>\"\n ],\n \"kline_type\": \"1D\",\n \"market\": \"cn\",\n \"stock_type\": \"stock\",\n \"start_datetime\": \"2023-11-07T05:31:56Z\",\n \"end_datetime\": \"2023-11-07T05:31:56Z\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.reportify.cn/v1/quant/quotes/kline/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbols\": [\n \"<string>\"\n ],\n \"kline_type\": \"1D\",\n \"market\": \"cn\",\n \"stock_type\": \"stock\",\n \"start_datetime\": \"2023-11-07T05:31:56Z\",\n \"end_datetime\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body
{
  "datas": [
    {}
  ],
  "metadata": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
批量获取多只股票的 K 线数据,通过 kline_type 参数支持多种周期。
curl -X POST "https://api.reportify.cn/v1/quant/quotes/kline/batch" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "symbols": ["000001", "600519"],
    "kline_type": "1D",
    "market": "cn"
  }'
import requests

response = requests.post(
    "https://api.reportify.cn/v1/quant/quotes/kline/batch",
    headers={"Authorization": "Bearer <token>"},
    json={
        "symbols": ["000001", "600519"],
        "kline_type": "1D",
        "market": "cn",
        "start_datetime": "2026-01-01 00:00:00",
        "end_datetime": "2026-01-31 00:00:00"
    }
)
print(response.json())
const response = await fetch('https://api.reportify.cn/v1/quant/quotes/kline/batch', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    symbols: ['000001', '600519'],
    kline_type: '1D',
    market: 'cn'
  })
});
const data = await response.json();

请求参数

symbols
array
required
股票代码列表
kline_type
string
default:"1D"
K 线周期类型:
  • 1M - 1 分钟线
  • 5M - 5 分钟线
  • 15M - 15 分钟线
  • 30M - 30 分钟线
  • 60M - 60 分钟线
  • 1D - 日线(默认)
  • 1W - 周线
  • 1MO - 月线
market
string
default:"cn"
股票市场:cn(A股), hk(港股), us(美股)
stock_type
string
default:"stock"
股票类型:stock(股票), etf(ETF), index(指数), sw(申万指数)
start_datetime
string
开始时间,格式:YYYY-MM-DD HH:MM:SS(可选,不传时按 kline_type 自动推算)
end_datetime
string
结束时间,格式:YYYY-MM-DD HH:MM:SS(可选,默认当前时间)

响应参数

datas
array
K 线数据列表,按日期(升序)和股票代码排序
metadata
object
查询元数据,包含 kline_type, start_datetime, end_datetime, count

响应示例

{
  "datas": [
    {
      "market": "cn",
      "date": "2026-04-01",
      "symbol": "000001",
      "open": 10.98,
      "high": 11.02,
      "low": 10.93,
      "close": 11.0,
      "volume": 17744106,
      "amount": 194464864.8,
      "chg_percent": 0.1821,
      "turnover_rate": 0.0004
    },
    {
      "market": "cn",
      "date": "2026-04-01",
      "symbol": "600519",
      "open": 1572.0,
      "high": 1589.0,
      "low": 1568.0,
      "close": 1583.0,
      "volume": 3421890,
      "amount": 5412345678.0,
      "chg_percent": 0.6997,
      "turnover_rate": 0.0003
    }
  ],
  "metadata": {
    "kline_type": "1D",
    "start_datetime": "2026-04-01 00:00:00",
    "end_datetime": "2026-04-30 00:00:00",
    "count": 2
  }
}

使用示例

批量获取日线数据

import requests

response = requests.post(
    "https://api.reportify.cn/v1/quant/quotes/kline/batch",
    headers={"Authorization": "Bearer <token>"},
    json={
        "symbols": ["000001", "600519", "000002"],
        "kline_type": "1D",
        "start_datetime": "2026-01-01 00:00:00",
        "end_datetime": "2026-03-31 00:00:00"
    }
)
data = response.json()
for row in data["datas"]:
    print(f"{row['symbol']} {row['date']}: 收{row['close']}")

批量获取 5 分钟 K 线

response = requests.post(
    "https://api.reportify.cn/v1/quant/quotes/kline/batch",
    headers={"Authorization": "Bearer <token>"},
    json={
        "symbols": ["000001", "600519"],
        "kline_type": "5M",
        "start_datetime": "2026-04-09 09:30:00",
        "end_datetime": "2026-04-09 15:00:00"
    }
)

Authorizations

Authorization
string
header
required

Enter your Bearer token

Body

application/json

Batch kline request input.

symbols
string[]
required

List of stock codes (required)

Minimum array length: 1
kline_type
enum<string>
default:1D

Kline period type

Available options:
1M,
5M,
15M,
30M,
60M,
1D,
1W,
1MO
market
enum<string>
default:cn

Stock market

Available options:
cn,
hk,
us,
global
stock_type
enum<string>
default:stock

Stock type

Available options:
stock,
etf,
index,
sw
start_datetime
string<date-time> | null

Start datetime (YYYY-MM-DD HH:MM:SS)

end_datetime
string<date-time> | null

End datetime (YYYY-MM-DD HH:MM:SS)

Response

Successful Response

Kline data response.

datas
Datas · object[]
required

Kline data list

metadata
Metadata · object
required

Query metadata (symbol, kline_type, start_datetime, end_datetime, count)