Skip to content

Current K-Line

GET /api/v1.0/quote/{symbol}/cur-kline

Get 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

NameTypeInRequiredDescription
symbolstringpathyesSymbol code, e.g. HK.00700.
numintqueryyesNumber of K-line bars, 1~370.
ktypeintquerynoK-line type, default 2. See ktype enum table below.
autypeintquerynoAdjustment type, default 1. See autype enum table below.
extended_timeintquerynoPre/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)

ValueMeaning
11 minute
2Day
3Week
4Month
5Year
65 minutes
715 minutes
830 minutes
960 minutes
103 minutes
11Quarter
14120 minutes
15240 minutes
2610 minutes
29180 minutes

Enum autype (Adjustment type)

ValueMeaning
0No adjustment
1Forward adjustment (excluding dividends)
2Backward adjustment (excluding dividends)
3Forward adjustment (including dividends)
4Backward adjustment (including dividends)

Enum extended_time (Pre/post market / night session toggle)

ValueMeaning
0Default (excluding pre/post market)
1Including pre/post market
2Including 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" | jq

Response Fields

Returns data.kline_list[], each element is one K-line bar:

FieldTypeDescription
codestringSymbol code, e.g. HK.00700
namestringEnglish name
sc_namestringSimplified Chinese name
tc_namestringTraditional Chinese name
time_keyintK-line time, millisecond timestamp
dateintK-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_pricefloatOpen price
close_pricefloatClose price (latest bar uses the current price)
high_pricefloatHigh price
low_pricefloatLow price
last_close_pricefloatPrevious close price
volumeintVolume (shares)
turnoverfloatTurnover amount
turnover_ratefloatTurnover rate (percentage, 20 means 20%); may be omitted when value is 0
pefloatPrice-to-earnings ratio
change_ratefloatChange 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=1 only 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:

PrefixMarketSupported Categories
HKHong KongEquity / Trust / REIT / Warrant / CBBC / Inline Warrant / Index / Sector / ETF / Option
USUnited StatesEquity / ETF / Index
SHShanghaiEquity / ETF / Index / Sector
SZShenzhenEquity / ETF / Index / Sector
BJBeijingEquity / Index

Error Codes

ret_codeerror.codeTrigger ScenarioRecommended Action
0Success
-3invalid_parameterRequired 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
-4Symbol code invalid or parameter assembly failed (e.g. HK.99999999 security not found)Verify that the symbol code actually exists
-5Backend call failed (network/timeout)Retry; if persistent, contact backend support
>0Backend 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
      }
    ]
  }
}