Market State
POST/api/v1.0/quote/market-stateGet the current market state (open / closed / pre-market / after-hours / overnight / closing auction, etc.) for a batch of symbols. Useful for determining quote availability and freshness.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
code_list | string[] | body | yes | List of symbol codes in {market}.{code} format, e.g. ["HK.00700","US.AAPL","SH.600519"]. Market prefix is required. Max 400 per batch. |
is_contain_ba | bool | body | no | Whether to include US pre-market/after-hours sessions; true switches trade_section to the next trading day's schedule once pre/after-hours begins. Default false. Only affects US-related entries. |
is_contain_overnight | bool | body | no | Whether to include US overnight session; true switches trade_section to the next trading day's schedule once overnight begins. Default false. Only affects US-related entries. |
is_need_crypto_multi_broker | bool | body | no | Whether to return multi-broker data for crypto market; true expands multiple records per market_id by broker. Default false. Only affects CC. prefix entries. |
Request Example
bash
curl -X POST 'https://webapi.futunn.com/api/v1.0/quote/market-state' \
-H 'Content-Type: application/json' \
-d '{"code_list":["HK.00700","US.AAPL","SH.600519","SZ.000001"]}' | jqResponse Fields
Returns data.market_state_list[], with elements as follows.
| Name | Type | Description |
|---|---|---|
data | object | |
data.market_state_list | object[] | |
data.market_state_list[].code | string | |
data.market_state_list[].stock_name | string | |
data.market_state_list[].sc_name | string | |
data.market_state_list[].tc_name | string | |
data.market_state_list[].market_state | string | |
data.market_state_list[].time_date | int | |
data.market_state_list[].traded_seconds | string | |
data.market_state_list[].total_seconds | string | |
data.market_state_list[].trade_section | string | |
data.market_state_list[].broker_id | int | |
data.market_state_list[].broker_ids | string | |
pagination | object | Pagination returned by some endpoints |
Supported Markets
- Code must use a supported market prefix from the 12 markets listed below; otherwise returns
invalid_symbol:HK(Hong Kong) /US(United States) /SH(Shanghai A-shares) /SZ(Shenzhen A-shares) /BJ(Beijing Stock Exchange) /SG(Singapore) /JP(Japan) /KR(Korea) /CA(Canada) /AU(Australia) /SH_FX(Shanghai-Shenzhen FX) /CC(Crypto). - Unsupported market prefixes (not limited to):
DEGermany,FRFrance,GBUK,MYMalaysia,THThailand,IDIndonesia,VNVietnam,NZNew Zealand,NLNetherlands,PTPortugal,ITItaly. - For unsupported markets: the corresponding entry retains the requested code,
market_statereturns"NONE", extended fields are omitted; does not affect other valid symbols in the same batch. - Max
code_listlength is 400; exceeding or empty array returnsinvalid_parameter. - Market prefix is required; missing prefix (e.g.
"00700") triggersinvalid_parameter.
Error Codes
| ret_code | error.code | Trigger Condition | Recommended Action |
|---|---|---|---|
| 0 | — | Success, data.market_state_list length equals request code_list length | Iterate market_state_list, match by code to your requested symbols |
| -3 | invalid_parameter | code_list missing / element type not string / list empty / length exceeds 400 / element missing market prefix | Fix request body, ensure {market}.{code} format |
| -5 | backend_biz_error | Business error; see the response message for details | Read error.message for details; may retry |
| -2 / -4 / -6 | internal_error | Service error | Retain x-trace-id and report to support |
Response Example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"market_state_list": [
{
"code": "HK.00700",
"market_state": "AFTERNOON",
"stock_name": "腾讯控股"
},
{
"code": "US.AAPL",
"market_state": "AFTER_HOURS_END",
"stock_name": "苹果"
},
{
"code": "SH.600519",
"market_state": "AFTERNOON",
"stock_name": "贵州茅台"
},
{
"code": "SZ.000001",
"market_state": "AFTERNOON",
"stock_name": "平安银行"
}
]
}
}