Capital Flow (History)
GET/v1/quote/{symbol}/capital-flow/historyGet historical capital flow in/out data at day/week/month level for an individual stock.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
symbol | string | path | yes | Symbol code, MARKET.CODE format, e.g. HK.00700 / US.AAPL / SZ.000001. |
period_type | string | query | no | Aggregation period, default DAY. See Naming Dictionary. |
start | string | query | no | Start date yyyy-MM-dd (inclusive), omit for no lower bound. |
end | string | query | no | End date yyyy-MM-dd (inclusive), omit to use current date. |
count | int | query | no | Maximum number of data points to return, range 1~1000, default 365. |
Request Example
bash
curl '$ip/v1/quote/HK.00700/capital-flow/history?period_type=DAY&start=2026-04-23&end=2026-05-23' | jqResponse Fields
Top-level data:
| Field | Type | Description |
|---|---|---|
flow_list | array | Data point list, sorted by time ascending; empty array when symbol is valid but no data currently. |
Top-level pagination:
| Field | Type | Description |
|---|---|---|
has_more | bool | Whether there is more earlier data available for pagination (paginate towards earlier dates). |
flow_list[i]:
| Field | Type | Description |
|---|---|---|
capital_flow_item_time | int64 | Data time point (millisecond timestamp, aligned to day / week / month per period_type). |
in_flow | double | Overall net inflow (in security's local currency; positive = net inflow, negative = net outflow). |
main_in_flow | double | Main force net inflow (super-large + large orders combined). |
super_in_flow | double | Super-large orders net inflow. |
big_in_flow | double | Large orders net inflow. |
mid_in_flow | double | Medium orders net inflow. |
sml_in_flow | double | Small orders net inflow. |
main_deal_ratio | double | Main force transaction ratio (0.123 = 12.3%); provided by backend on demand, omitted when absent. |
acc_main_in_flow | double | Accumulated main force net inflow; provided by backend on demand, omitted when absent. |
Supported Markets
| Dimension | Supported | Not Supported / No Data Currently |
|---|---|---|
| Market (Stocks / ETFs) | HK · US · SH · SZ · SG · JP · CA · AU | KR · MY · BJ (some codes parseable but no capital flow data currently) |
| Category | Stocks, ETFs | Indices, warrants (valid symbol but flow_list always empty); options / futures / cryptocurrencies (not supported) |
| Time Range | Day / week / month aggregation, specify start / end range | For intraday minute-level data use Capital Flow (Intraday) API |
| Pagination | Via pagination.has_more + adjusting end to paginate towards earlier dates | — |
When a symbol is valid but has no capital flow data (warrants / indices / suspended / pre-listing / no trades in range), the API returns ret_code=0, flow_list=[], pagination.has_more=false.
Error Codes
| ret_code | error.code | Trigger Scenario | Suggested Handling |
|---|---|---|---|
| 0 | — | Success (including valid symbol with no data, flow_list=[]) | Check flow_list length to determine if data exists |
| -3 | invalid_parameter | symbol does not match MARKET.CODE format / period_type not in DAY/WEEK/MONTH / start or end not a valid calendar date / count out of range | Validate parameters and retry |
| -7 | invalid_symbol | Symbol format is valid but not found in security cache (does not exist / typo / unsupported market like KR / MY) | Verify symbol actually exists |
| -8 | unsupported | Backend explicitly returns market does not support historical capital flow | Use a symbol from a supported market |
Response Example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"flow_list": [
{
"capital_flow_item_time": 1776873600000,
"in_flow": 200218920,
"main_in_flow": 24536730,
"super_in_flow": 6079988.56,
"big_in_flow": 23699631.17,
"mid_in_flow": 21197077.81,
"sml_in_flow": -11104470.93,
"main_deal_ratio": 0.2259
}
]
},
"pagination": {
"has_more": false
}
}