A-Share Adjusted Candlestick Chart
A-Share Adjusted Candlestick Chart
Documentation
API Introduction
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).
Applicable Scenarios
- Quantitative Trading Strategy Backtesting: Use forward-adjusted data to eliminate the impact of ex-dividend and ex-rights, ensuring price series continuity and improving backtesting accuracy.
- Financial Chart Display: Provide standardized K-line data for stock trading software or financial websites, supporting users to switch and view trends under different adjustment statuses.
- Technical Pattern Analysis: Calculate moving averages, MACD, and other technical indicators based on continuous price data, avoiding data discontinuities caused by dividends and rights issues.
Request and Response Description
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.
Integration Suggestions
- Adjustment Selection: When performing long-term trend analysis or strategy backtesting, it is strongly recommended to use forward adjustment (
fuquan=1) to maintain the continuity of historical prices based on the current price. - Period Matching: Pay attention to the numerical encoding of the
typeparameter. Minute-level and daily/weekly/monthly levels use different encoding segments. Please strictly follow the documentation when passing values. - Data Caching: Historical K-line data changes infrequently. It is recommended to implement appropriate caching for non-real-time data at the business layer to reduce API call frequency and improve response speed.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
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 |