POSTaliyunmarket-cmapi00066016-finance-a-kline-restoration
A-Share Adjusted Candlestick Chart
A-Share Adjusted Candlestick Chart
Documentation
A-Share Adjusted Candlestick Chart
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Shell Example
curl --request POST \
--url 'https://openapi.toolkk.com/v1/aliyunmarket-cmapi00066016-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}'Python Example
import os
import requests
url = "https://openapi.toolkk.com/v1/aliyunmarket-cmapi00066016-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())Go Example
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/aliyunmarket-cmapi00066016-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))
}Java Example
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/aliyunmarket-cmapi00066016-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());
}
}Request Example
{
"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后复权"
}Response Example
[
{
"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
}
]Request Fields
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 |
Response Fields
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 |