圈款(預繳)查詢
QueryReserves
版本資訊
v2.2.9 起新增功能
輸入參數
| 參數 | 類別 | 說明 |
|---|---|---|
| account | Account | 帳號 |
Result 回傳
| 參數 | 類別 | 說明 |
|---|---|---|
| is_success | bool | 是否成功 |
| data | ReserveCashSummary | 回傳整戶預繳彙總 |
| message | string | 當is_success = false 回傳錯誤訊息 |
預繳彙總 ReserveCashSummary 欄位
Return type : Object
| 參數 | 類別 | 說明 |
|---|---|---|
| branch_no | string | 分公司代號 |
| account | string | 帳號 |
| currency | string | 幣別 : TWD 新台幣 |
| reserved_amount | int | 預收金額(元) |
| returned_amount | int | 返還金額(元) |
| ordered_amount | int | 已委託金額(元) |
請求範例
auto reserves_response = sdk->stock->query_reserves(target_account);
// 搭配自定義 .cpp & hpp Output
if (!reserves_response.is_success) {
std::cout << "query reserves failed reason: "
<< (reserves_response.message.has_value() ? reserves_response.message.value() : "No message")
<< std::endl;
}
else {
if (reserves_response.data.has_value()) {
std::cout << reserves_response.data.value() << std::endl;
}
else {
std::cout << "Query reserves success but no data returned." << std::endl;
}
}
回傳範例
// 搭配自定義 .cpp & hpp Output
[ReserveCashSummary]
branch_no: 20207 // 分公司代號 (string)
account: 9801163 // 帳號 (string)
currency: TWD // 幣別 (string)
reserved_amount: 9960200 // 預收金額 (int)
returned_amount: 0 // 返還金額 (int)
ordered_amount: 0 // 已委託金額 (int)