Stock Connect Flow Rankings
GET/api/v1.0/quote/stock-connect/rankStock Connect per-stock net-inflow ranking. market=SH / SZ / HK; period_type DAY/WEEK/MONTH/QUARTER; default sort by net-inflow amount desc. Omit date to use the latest session. Amounts in yuan.
Request
| Name | Type | In | Required | Description |
|---|---|---|---|---|
market | string | query | yes | Market: SH / SZ / HK Values SH, SZ, HK |
period_type | string | query | no | Period: DAY (default) / WEEK / MONTH / QUARTER Default "DAY"; Values DAY, WEEK, MONTH, QUARTER |
sort_field | string | query | no | Sort: SHARES / AMOUNT (default) / RATIO Default "AMOUNT"; Values SHARES, AMOUNT, RATIO |
sort_dir | string | query | no | Sort direction, default DESC Default "DESC"; Values DESC, ASC |
date | string | query | no | Query date yyyy-MM-dd; omit for now Max length 10; Default ""; Pattern ^$|^\d{4}-\d{2}-\d{2}$ |
limit | int | query | no | Page size, default 20, max 100 ≥ 1; ≤ 100; Default 20 |
page_flag | string | query | no | Pagination cursor; omit on first page Max length 20; Default "" |
Example
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/stock-connect/rank?market=1&period_type=1&sort_field=1' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse
| Name | Type | Description |
|---|---|---|
data | object | |
data.update_time | int | Ranking as-of unix seconds |
data.items | object[] | |
data.items[].code | string | Symbol, e.g. SH.600519 |
data.items[].name | string | Stock name |
data.items[].net_inflow_shares | int | Net inflow shares |
data.items[].net_inflow_amount | string | Net inflow amount in yuan |
data.items[].inflow_ratio | string | Net inflow shares / float (0~1) |
pagination | object | |
pagination.completed | bool | True when this is the last page |
pagination.page_flag | string | Next page cursor |
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",
"items": [
{
"code": "example",
"name": "example",
"net_inflow_shares": 0,
"net_inflow_amount": "example",
"inflow_ratio": "example"
}
]
},
"pagination": {
"completed": true,
"page_flag": ""
}
}