Current K-Line
GET/api/v1.0/quote/{symbol}/cur-klineGet real-time K-line (candlestick) data for a symbol, returning the latest num bars. Supports minute/day/week/month/year/quarter periods and adjustment types. Only returns the latest N bars.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
symbol | string | path | yes | Symbol code, e.g. HK.00700. |
num | int | query | yes | Number of K-line bars, 1~370. |
ktype | int | query | no | K-line type, default 2. See ktype enum table below. |
autype | int | query | no | Adjustment type, default 1. See autype enum table below. |
extended_time | int | query | no | Pre/post market / night session toggle, default 0 (only effective for US 1-min K-line). See extended_time enum table below. |
Enum ktype (K-line type)
| Value | Meaning |
|---|---|
| 1 | 1 minute |
| 2 | Day |
| 3 | Week |
| 4 | Month |
| 5 | Year |
| 6 | 5 minutes |
| 7 | 15 minutes |
| 8 | 30 minutes |
| 9 | 60 minutes |
| 10 | 3 minutes |
| 11 | Quarter |
| 14 | 120 minutes |
| 15 | 240 minutes |
| 26 | 10 minutes |
| 29 | 180 minutes |
Enum autype (Adjustment type)
| Value | Meaning |
|---|---|
| 0 | No adjustment |
| 1 | Forward adjustment (excluding dividends) |
| 2 | Backward adjustment (excluding dividends) |
| 3 | Forward adjustment (including dividends) |
| 4 | Backward adjustment (including dividends) |
Enum extended_time (Pre/post market / night session toggle)
| Value | Meaning |
|---|---|
| 0 | Default (excluding pre/post market) |
| 1 | Including pre/post market |
| 2 | Including night session |
Request Example
bash
curl -s "https://webapi.moomoo.com/api/v1.0/quote/HK.00700/cur-kline?num=2&ktype=2&autype=1" | jqResponse Fields
Returns data.kline_list[], each element is one K-line bar:
| Field | Type | Description |
|---|---|---|
| code | string | Symbol code, e.g. HK.00700 |
| name | string | English name |
| sc_name | string | Simplified Chinese name |
| tc_name | string | Traditional Chinese name |
| time_key | int | K-line time, millisecond timestamp |
| date | int | K-line date, YYYYMMDD integer (for minute K-lines it is the trading day, for daily and above it is the local date), e.g. 20260601 |
| open_price | float | Open price |
| close_price | float | Close price (latest bar uses the current price) |
| high_price | float | High price |
| low_price | float | Low price |
| last_close_price | float | Previous close price |
| volume | int | Volume (shares) |
| turnover | float | Turnover amount |
| turnover_rate | float | Turnover rate (percentage, 20 means 20%); may be omitted when value is 0 |
| pe | float | Price-to-earnings ratio |
| change_rate | float | Change rate (percentage) = (close_price - last_close_price) / last_close_price x 100 |
Supported Markets
- Code must use a supported market prefix from the 5 markets listed below; otherwise returns
invalid_symbol. - Pre/post market:
extended_time=1only takes effect for US 1-min K-line (ktype=1); for other ktype values or non-US markets, this flag is ignored.
Supported market prefixes and categories:
| Prefix | Market | Supported Categories |
|---|---|---|
| HK | Hong Kong | Equity / Trust / REIT / Warrant / CBBC / Inline Warrant / Index / Sector / ETF / Option |
| US | United States | Equity / ETF / Index |
| SH | Shanghai | Equity / ETF / Index / Sector |
| SZ | Shenzhen | Equity / ETF / Index / Sector |
| BJ | Beijing | Equity / Index |
Error Codes
| ret_code | error.code | Trigger Scenario | Recommended Action |
|---|---|---|---|
| 0 | — | Success | — |
| -3 | invalid_parameter | Required field missing (e.g. num) / type error / out of range (num>370) / invalid enum (ktype/autype not in valid set) | Check that request parameters meet the constraints |
| -4 | — | Symbol code invalid or parameter assembly failed (e.g. HK.99999999 security not found) | Verify that the symbol code actually exists |
| -5 | — | Backend call failed (network/timeout) | Retry; if persistent, contact backend support |
| >0 | — | Backend business error passthrough (no permission, risk control, rate limit, etc.) | Check ret_msg message; for permission errors, confirm the account has the corresponding market real-time quote access enabled |
Response Example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"kline_list": [
{
"code": "HK.00700",
"name": "TENCENT",
"sc_name": "腾讯控股",
"tc_name": "騰訊控股",
"time_key": 1780243200000,
"date": 20260601,
"open_price": 432.4,
"close_price": 436,
"high_price": 442,
"low_price": 430,
"last_close_price": 505,
"volume": 35164391,
"turnover": 15331009622,
"turnover_rate": 0.00386,
"pe": 15.97,
"change_rate": -13.663366336633665
},
{
"code": "HK.00700",
"name": "TENCENT",
"sc_name": "腾讯控股",
"tc_name": "騰訊控股",
"time_key": 1780329600000,
"date": 20260602,
"open_price": 438,
"close_price": 481.6,
"high_price": 484.8,
"low_price": 437.4,
"last_close_price": 436,
"volume": 101874275,
"turnover": 47789124229,
"turnover_rate": 0.01117,
"pe": 17.64,
"change_rate": 10.458715596330276
}
]
}
}