Historical Stock Connect Flows
GET/api/v1.0/quote/stock-connect/historyHistorical daily/weekly/monthly/quarterly Stock Connect net-inflow series. Time descending; pass back page_flag as the last timestamp for the next page. Amounts in yuan. For intraday use quote.stock_connect_intraday.
Request
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
channel | string | query | yes | Channel: SH / SZ / HK_SH / HK_SZ / NORTH / SOUTH |
period_type | string | query | no | Period: DAY (default) / WEEK / MONTH / QUARTER |
data_kind | string | query | no | QUOTA (default) / NET_TURNOVER / TRADING_AMOUNT |
end | string | query | no | End date yyyy-MM-dd inclusive; omit for now; use page_flag when paging |
limit | int | query | no | Page size, default 30, max 200 |
page_flag | string | query | no | Pagination cursor; omit on first page, pass back pagination.page_flag |
Example
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/stock-connect/history?channel=1&period_type=1&data_kind=1' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse
| Field | Type | Description |
|---|---|---|
data.points | object[] | |
data.update_time | integer | Update time, unix seconds |
data.points[].timestamp | integer | Data time, unix seconds |
data.points[].sh | object | SH Connect point; may be empty when the channel was not requested |
data.points[].sh[].net_inflow | string | Net inflow in yuan |
data.points[].sh[].close_price | string | Index/market close price |
data.points[].sh[].last_close_price | string | Previous close, for change calculation |
data.points[].sh[].buy_turnover | string | Buy turnover in yuan (NET_TURNOVER only) |
data.points[].sh[].sell_turnover | string | Sell turnover in yuan (NET_TURNOVER only) |
data.points[].sh[].trading_amount | string | Total trading amount in yuan |
data.points[].sz | object | SH Connect point; may be empty when the channel was not requested |
data.points[].sz[].net_inflow | string | Net inflow in yuan |
data.points[].sz[].close_price | string | Index/market close price |
data.points[].sz[].last_close_price | string | Previous close, for change calculation |
data.points[].sz[].buy_turnover | string | Buy turnover in yuan (NET_TURNOVER only) |
data.points[].sz[].sell_turnover | string | Sell turnover in yuan (NET_TURNOVER only) |
data.points[].sz[].trading_amount | string | Total trading amount in yuan |
data.points[].hk_sh | object | SH Connect point; may be empty when the channel was not requested |
data.points[].hk_sh[].net_inflow | string | Net inflow in yuan |
data.points[].hk_sh[].close_price | string | Index/market close price |
data.points[].hk_sh[].last_close_price | string | Previous close, for change calculation |
data.points[].hk_sh[].buy_turnover | string | Buy turnover in yuan (NET_TURNOVER only) |
data.points[].hk_sh[].sell_turnover | string | Sell turnover in yuan (NET_TURNOVER only) |
data.points[].hk_sh[].trading_amount | string | Total trading amount in yuan |
data.points[].hk_sz | object | SH Connect point; may be empty when the channel was not requested |
data.points[].hk_sz[].net_inflow | string | Net inflow in yuan |
data.points[].hk_sz[].close_price | string | Index/market close price |
data.points[].hk_sz[].last_close_price | string | Previous close, for change calculation |
data.points[].hk_sz[].buy_turnover | string | Buy turnover in yuan (NET_TURNOVER only) |
data.points[].hk_sz[].sell_turnover | string | Sell turnover in yuan (NET_TURNOVER only) |
data.points[].hk_sz[].trading_amount | string | Total trading amount in yuan |
pagination.completed | string | True when this is the last page |
pagination.page_flag | string | Next page cursor (last timestamp of this page) |
Errors
| ret_code | error.code | Description |
|---|---|---|
| 0 | — | Success |
| -3 | invalid_parameter | Missing or invalid parameter |
| -7 | invalid_symbol | Unknown symbol |
| -8 | unsupported | Market or product is not supported |
| -9 | permission_denied | Missing permission |
| -10 | no_data | No data |
| -11 | rate_limited | Too many requests |
Sample
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"update_time": "example",
"points": [
{
"timestamp": 0,
"sh": "example",
"sz": "example",
"hk_sh": "example",
"hk_sz": "example"
}
]
},
"pagination": {
"completed": true,
"page_flag": ""
}
}