A-Share Adjusted Candlestick Chart
A-Share Adjusted Candlestick Chart
5 coins/call
We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
A-Share Adjusted Candlestick Chart
5 coins/call
This API provides K-line historical data query services for A-share market stocks, with the core capability of supporting ex-dividend adjustment. Developers can obtain a complete market data array, including open price, close price, high price, low price, trading volume, trading value, and change information, by specifying the stock symbol, K-line period (from 1-minute to yearly K), and adjustment type (forward adjustment, backward adjustment, or no adjustment).
Request Parameters:
symbol (Required): Instrument code, e.g., sh688193.type (Required): K-line period identifier. 1: 1-minute, 5: 5-minute, 15: 15-minute, 30: 30-minute, 60: 60-minute, 101: Daily K, 102: Weekly K, 103: Monthly K, 104: Quarterly K, 105: Half-yearly K, 106: Yearly K.fuquan (Required): Ex-dividend adjustment status. 0: No adjustment, 1: Forward adjustment, 2: Backward adjustment.limit (Optional): Number of data entries to return, default is 10.Response Results: Returns a JSON array, where each element contains the following fields:
day: Data timestamp (accurate to the minute).open, high_px, low_px, close_px: Open, high, low, close prices.volume: Trading volume.value: Trading value.change, changeRate: Change amount and change rate.fuquan=1) to maintain the continuity of historical prices based on the current price.type parameter. Minute-level and daily/weekly/monthly levels use different encoding segments. Please strictly follow the documentation when passing values.Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
{
"symbol": "品种代码,如:sh688193",
"type": "1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线...",
"limit": "返回条数,默认10",
"fuquan": "复权状态,0不复权,1前复权,2后复权"
}[
{
"volume": 34239,
"high_px": 22.06,
"change": 0.07,
"close_px": 22.03,
"low_px": 21.93,
"changeRate": 0.32,
"value": 75339657,
"day": "2024-04-19 14:30",
"open": 21.96
}
]The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.symbol | object | {...} |
| properties.symbol.type | string | string |
| properties.symbol.description | string | 品种代码,如:sh688193 |
| properties.type | object | {...} |
| properties.type.type | string |
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | array |
| items | object | {...} |
| items.type | string | object |
| items.properties | object | {...} |
| example | array | {"volume":34239,"high_px":22.06,"change":0.07,"close_px":22.03,"low_px":21.93,"changeRate":0.32,"value":75339657,"day":"2024-04-19 14:30","open":21.96} |
| example[] | object | {...} |
| example[].volume | number |
curl --request POST \
--url 'https://openapi.toolkk.com/v1/finance-a-kline-restoration' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{\n "symbol": "品种代码,如:sh688193",\n "type": "1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线...",\n "limit": "返回条数,默认10",\n "fuquan": "复权状态,0不复权,1前复权,2后复权"\n}'import os
import requests
url = "https://openapi.toolkk.com/v1/finance-a-kline-restoration"
payload = {
"symbol": "品种代码,如:sh688193",
"type": "1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线...",
"limit": "返回条数,默认10",
"fuquan": "复权状态,0不复权,1前复权,2后复权"
}
headers = {
"Content-Type": "application/json",
"X-API-Key": os.getenv("TOOLKK_API_KEY", "YOUR_API_KEY"),
}
response = requests.request("POST", url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/finance-a-kline-restoration"
payload := []byte("{\n \"symbol\": \"品种代码,如:sh688193\",\n \"type\": \"1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线...\",\n \"limit\": \"返回条数,默认10\",\n \"fuquan\": \"复权状态,0不复权,1前复权,2后复权\"\n}")
req, err := http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ToolkkExample {
public static void main(String[] args) throws Exception {
String payload = "{\n \"symbol\": \"品种代码,如:sh688193\",\n \"type\": \"1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线...\",\n \"limit\": \"返回条数,默认10\",\n \"fuquan\": \"复权状态,0不复权,1前复权,2后复权\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.toolkk.com/v1/finance-a-kline-restoration"))
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.header("Content-Type", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}| string |
| properties.type.description | string | 1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线;105:半年K线;106:年K线 |
| properties.limit | object | {...} |
| properties.limit.type | string | string |
| properties.limit.description | string | 返回条数,默认10 |
| properties.fuquan | object | {...} |
| properties.fuquan.type | string | string |
| properties.fuquan.description | string | 复权状态,0不复权,1前复权,2后复权 |
| required | array | "symbol" |
| required[] | string | symbol |
| 34239 |
| example[].high_px | number | 22.06 |
| example[].change | number | 0.07 |
| example[].close_px | number | 22.03 |
| example[].low_px | number | 21.93 |
| example[].changeRate | number | 0.32 |
| example[].value | number | 75339657 |
| example[].day | string | 2024-04-19 14:30 |
| example[].open | number | 21.96 |
<?php
$endpoint = 'https://openapi.toolkk.com/v1/finance-a-kline-restoration';
$payload = "{\n \"symbol\": \"品种代码,如:sh688193\",\n \"type\": \"1:1分钟K线;5:5分钟K线;15:15分钟K线; 30:30分钟K线;60:60分钟K线;101:日K线;102:周K线;103:月K线; 104:季度K线...\",\n \"limit\": \"返回条数,默认10\",\n \"fuquan\": \"复权状态,0不复权,1前复权,2后复权\"\n}";
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;