K-line closing times
POST/api/v1.0/quote/kline-close-timeBatch query theoretical closing times of regular-session day, week, month, quarter, or year bars. Both request and response timestamps use Unix microseconds, with subsecond inputs rounded down to whole seconds.
Request parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
req_item | object[] | body | Yes | Batch of 1 to 400 request items |
req_item[].market_code | integer | body | No | Market code; takes priority over security_id and src_code_item when multiple identifiers are provided |
req_item[].security_id | integer | body | No | Internal security ID |
req_item[].src_code_item | object | body | No | Trading code and exchange pair |
req_item[].src_code_item.src_code | string | body | No | Exchange ticker, e.g. AAPL |
req_item[].src_code_item.exchange | string | body | No | Exchange code, e.g. US |
req_item[].broker_id | integer | body | No | Broker ID for crypto instruments only |
req_item[].kline_type_v2 | object | body | Yes | K-line interval object |
req_item[].kline_type_v2.base_type | integer | body | Yes | Base cycle: supports 3 (day), 4 (week), 5 (month), 6 (quarter), and 7 (year); other values fail the item (success=false) |
req_item[].kline_type_v2.custom_number | integer | body | Yes | Interval multiplier; pass 1 for standard periods |
req_item[].time_list | object[] | body | Yes | Non-empty list of K-line bar timestamps to query |
req_item[].time_list[].time_key | integer | body | Yes | Bar timestamp as a positive integer in Unix microseconds; multiply millisecond time_key values from Historical Candlesticks by 1000 |
Request example
bash
curl -s -X POST "https://webapi.futunn.com/api/v1.0/quote/kline-close-time" \
-H "Authorization: Bearer <AccessToken>" \
-H "Content-Type: application/json" \
-d '{"req_item":[{"market_code":1,"kline_type_v2":{"base_type":3,"custom_number":1},"time_list":[{"time_key":1793548800000000}]}]}'Response fields
Fields under data.
| Field | Type | Description |
|---|---|---|
items | object[] | Per-item results in request order |
items[].market_code | integer | Echoed market code; omitted when not provided |
items[].security_id | string | Echoed security ID as a numeric string; omitted when not provided |
items[].src_code_item | object | Echoed trading code and exchange pair; omitted when not provided |
items[].src_code_item.src_code | string | Exchange ticker |
items[].src_code_item.exchange | string | Exchange code |
items[].broker_id | integer | Echoed crypto broker ID; omitted when not provided |
items[].kline_type_v2 | object | Echoed K-line interval object |
items[].kline_type_v2.base_type | integer | Base cycle type (failed items may echo unsupported values) |
items[].kline_type_v2.custom_number | integer | Interval multiplier |
items[].success | boolean | Whether this item succeeded; check per item even when top-level code is 0 |
items[].time_list | object[] | Bar timestamps and theoretical closing times |
items[].time_list[].time_key | integer | Bar timestamp in Unix microseconds |
items[].time_list[].close_time | integer | Theoretical closing time in Unix microseconds; omitted when unavailable or failed |
Response example
The Hong Kong daily bar in this example closes at 16:00 local time on November 2, 2026.
json
{
"code": 0,
"message": "success",
"data": {
"items": [
{
"kline_type_v2": {
"base_type": 3,
"custom_number": 1
},
"market_code": 1,
"success": true,
"time_list": [
{
"close_time": 1793606400000000,
"time_key": 1793548800000000
}
]
}
]
}
}When base_type is changed to 2 (minute), the batch still returns code=0, while that item returns success=false and omits close_time:
json
{
"code": 0,
"message": "success",
"data": {
"items": [
{
"kline_type_v2": {
"base_type": 2,
"custom_number": 1
},
"market_code": 1,
"success": false,
"time_list": [
{
"time_key": 1793548800000000
}
]
}
]
}
}Errors
Failed responses (code != 0) include top-level trace_id (omitted when code=0).
| code | Description |
|---|---|
| -3 | Invalid body or parameter, such as empty req_item, exceeding 400 items, missing kline_type_v2 or time_list, or time_key below 1 |
| -5 | Internal calculation failure |
| -9 | Access denied by policy |
| -11 | Rate limit exceeded; back off for Retry-After seconds |
| -13 | Rate-limit service unavailable |
Notes
- Supply at least one of
market_code,security_id, orsrc_code_itemper item; when multiple are supplied, precedence ismarket_code, thensecurity_id, thensrc_code_item. code=0only indicates the batch was accepted; inspectitems[].successper item, and do not treat an omittedclose_timeas zero.