滬深港通累計淨流入
GET/api/v1.0/quote/stock-connect/cumulative獲取滬深港通單通道近 1/5/20/60 日累計淨流入。 今日 realtime 值可能缺省(非交易時段);累計金額單位為元。 當日分時請用 quote.stock_connect_intraday。
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
channel | string | 查詢 | 是 | 單通道:SH=滬股通 / SZ=深股通 / HK_SH=港股通(滬) / HK_SZ=港股通(深) |
data_kind | string | 查詢 | 否 | 口徑:QUOTA=額度使用淨流入(默認)/ NET_TURNOVER=成交淨買賣 / TRADING_AMOUNT=成交總額 |
請求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/stock-connect/cumulative?channel=1&data_kind=1' \
-H 'Authorization: Bearer <AccessToken>' | jq響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
data.channel_id | integer | 服務端通道 ID |
data.flow_in_1d | string | 今日淨流入(元;非交易時段可能缺省) |
data.flow_in_5d | string | 近 5 日累計淨流入(元) |
data.flow_in_20d | string | 近 20 日累計淨流入(元) |
data.flow_in_60d | string | 近 60 日累計淨流入(元) |
data.update_time | integer | 今日數據更新時間(Unix 秒) |
data.cumulative_time | integer | 累計數據截止時間(Unix 秒) |
錯誤碼
| ret_code | error.code | 說明 |
|---|---|---|
| 0 | — | 成功 |
| -3 | invalid_parameter | 參數缺失或不在允許範圍內 |
| -7 | invalid_symbol | 標的不存在 |
| -8 | unsupported | 市場或品類不支持 |
| -9 | permission_denied | 沒有對應權限 |
| -10 | no_data | 沒有可返回的數據 |
| -11 | rate_limited | 調用過於頻繁 |
響應示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"channel_id": 0,
"flow_in_1d": "example",
"flow_in_5d": "example",
"flow_in_20d": "example",
"flow_in_60d": "example",
"update_time": 0,
"cumulative_time": 0
}
}