History K-Line
GET/api/v1.0/quote/{symbol}/history-klineGet historical K-line (candlestick) data with pagination support.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
symbol | string | path | yes | Symbol code, e.g. US.FUTU. |
start | string | query | no | Start date (yyyy-MM-dd). |
end | string | query | yes | End date (yyyy-MM-dd). |
ktype | int | query | no | K-line type. Default 2. 1=1min, 2=Day, 3=Week, 4=Month, 5=Year, 6=5min, 7=15min, 8=30min, 9=60min. See Naming Dictionary. |
autype | int | query | no | Adjustment type. Default 1. 0=None, 1=Forward, 2=Backward. See Naming Dictionary. |
num | int | query | no | Number of bars. Default 370, max 370. |
extended_time | int | query | no | Extended hours. Default 0. 0=Default, 1=Include pre/after market (US minute K), 2=Include overnight (US). See Naming Dictionary. |
Request Example
bash
curl 'https://webapi.moomoo.com/api/v1.0/quote/US.FUTU/history-kline?start=2026-05-20&end=2026-05-23' | jqResponse Fields
| Field | Type | Description |
|---|---|---|
kline_list[].time_key | int | K-line time, millisecond timestamp |
kline_list[].date | int | K-line date YYYYMMDD (for minute K-lines it is the trading date; for daily and above it is the local date corresponding to the timestamp) |
kline_list[].time_zone | int | Timezone offset (minutes, relative to UTC), e.g. 480 (HK) / -300 (US daylight saving) |
kline_list[].open | float | Open price |
kline_list[].close | float | Close price |
kline_list[].high | float | High price |
kline_list[].low | float | Low price |
kline_list[].volume | int | Volume (shares) |
kline_list[].turnover | float | Turnover (amount) |
kline_list[].last_close | float | Previous close price |
kline_list[].pe_ratio | float | Price-to-earnings ratio |
kline_list[].turnover_rate | float | Turnover rate (percentage) |
kline_list[].change_rate | float | Change rate (percentage, relative to previous close) |
kline_list[].name | string | Stock English name |
kline_list[].sc_name | string | Stock Simplified Chinese name |
kline_list[].tc_name | string | Stock Traditional Chinese name |
kline_list[].open_interest | int | Open interest. Only returned for futures/options; other categories return 0 or omit |
kline_list[].settle_price | float | Settlement price. Only meaningful for futures/options (daily K and above); for stocks/ETFs/indices the backend backfills with close price, callers should ignore |
kline_list[].implied_volatility | float | Implied volatility (percentage). Only returned for options; other categories return 0 or omit |
next_time | int | Next page start time (millisecond timestamp, pass back as the next page's end parameter) |
volume_precision | int | Volume precision n. kline_list[].volume has been scaled by 10^n; callers need to divide by 10^n to restore. Only special categories like event contracts/crypto may have >0; stocks/ETFs/futures/options are generally 0 |
Supported Markets
- Code must use a supported market prefix from the registered market prefixes; otherwise returns
invalid_symbol(e.g. HK / US / SH / SZ / BJ / SG / CA / AU / FX / JP / CC / FT, etc.). - Supported categories: Stocks / ETFs / Indices / Futures / Options / Crypto; unsupported categories like preferred shares / SPACs / convertible bonds / CBBCs return an empty kline_list.
- Market prefixes not in the gateway enum (e.g. UK / IT): returns ret_code=-8 unsupported.
Error Codes
| ret_code | error.code | Trigger Condition | Recommended Action |
|---|---|---|---|
| 0 | — | Success; when valid but no data, kline_list is an empty array | — |
| -3 | invalid_parameter | Missing required field (end) / type error / invalid enum (ktype out of range) / date format mismatch | Correct parameters and retry |
| -7 | invalid_symbol | symbol format is valid but security not found in cache (e.g. HK.99999999) | Use the search API to confirm symbol validity |
| -8 | unsupported | Market prefix not in gateway supported range (e.g. UK.HSBA / IT.STM) | Confirm whether the market prefix is supported |
Response Example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"kline_list": [
{
"change_rate": 0.17670682730923695,
"close": 124.72,
"high": 127.45,
"last_close": 124.5,
"low": 122.7,
"name": "富途控股",
"open": 124.12,
"pe_ratio": 17.728,
"time_key": 1779249600000,
"turnover": 370529897,
"turnover_rate": 0.49348,
"volume": 2960896
},
{
"change_rate": -0.689544579858884,
"close": 123.86,
"high": 125.45,
"last_close": 124.72,
"low": 122.1,
"name": "富途控股",
"open": 122.7,
"pe_ratio": 17.606,
"time_key": 1779336000000,
"turnover": 271859605,
"turnover_rate": 0.36631,
"volume": 2197832
}
]
}
}