Settlement Inquiry
QuerySettlement
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account number |
| range | string | Date range, valid values: "0d" (Today), "3d" |
Return Result
| Parameter | Type | Description |
|---|---|---|
| is_success | bool | Success status |
| data | BankRemain | Returns balance information |
| message | string | Returns error message when is_success = False |
SettlementData Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| > account | object | Object |
| >> account | string | Account number |
| >> branch_no | string | Branch code |
| > details | list | Object |
| >> date | string | Query Date |
| >> settlement_date | string (Optional) | Settlement Date (Null if no data) |
| >> buy_value | int (Optional) | Buy Value (Null if no data) |
| >> buy_fee | int (Optional) | Buy Fee (Null if no data) |
| >> buy_settlement | int (Optional) | Buy Receivable/Payable (Null if no data) |
| >> buy_tax | int (Optional) | Buy Tax (Null if no data) |
| >> sell_value | int (Optional) | Sell Value (Null if no data) |
| >> sell_fee | int (Optional) | Sell Fee (Null if no data) |
| >> sell_settlement | int (Optional) | Sell Receivable/Payable (Null if no data) |
| >> sell_tax | int (Optional) | Sell Tax (Null if no data) |
| >> total_bs_value | int (Optional) | Total Buy/Sell Value (Null if no data) |
| >> total_fee | int (Optional) | Total Fee (Null if no data) |
| >> total_tax | int (Optional) | Total Tax (Null if no data) |
| >> total_settlement_amount | int (Optional) | Total Settlement Amount (Null if no data) |
| >> currency | string (Optional) | Currency (Null if no data) |
Request Example
auto settlement_response = sdk->accounting->query_settlement(target_account, "3d");
// With custom .cpp & hpp Output
if (settlement_response.is_success && settlement_response.data.has_value()) {
std::cout << *settlement_response.data << std::endl;
}
Response Example
{
isSuccess = true,
message = ,
data = SettlementData{
account = AccountRes { // Account Info
account = 26, // Account Number (string)
branchNo = 6460 // Branch Code (string)
},
details = [
Settlement{ // Settlement Details
date = 2024/03/04, // Query Date (string)
settlementDate = 2024/03/06, // Settlement Date (string)
buyValue = 735500, // Buy Value (int)
buyFee = 313, // Buy Fee (int)
buySettlement = -1429513, // Buy Settlement Amount (int)
buyTax = 0, // Buy Tax (int)
sellValue = 770500, // Sell Value (int)
sellFee = 320, // Sell Fee (int)
sellSettlement = 0, // Sell Settlement Amount (int)
sellTax = 2309, // Sell Tax (int)
totalBsValue = 1506000, // Total B/S Value (int)
totalFee = 633, // Total Fee (int)
totalSettlementAmount = -1429513, // Total Settlement Amount (int)
totalTax = 2309, // Total Tax (int)
currency = TWD // Currency (string)
},
Settlement{
date = 2024/03/05, // Query Date (string)
settlementDate = 2024/03/07, // Settlement Date (string)
buyValue = 2261470, // Buy Value (int)
buyFee = 1065, // Buy Fee (int)
buySettlement = -3895335, // Buy Settlement Amount (int)
buyTax = 0, // Buy Tax (int)
sellValue = 2488170, // Sell Value (int)
sellFee = 1137, // Sell Fee (int)
sellSettlement = 677626, // Sell Settlement Amount (int)
sellTax = 7412, // Sell Tax (int)
totalBsValue = 4749640, // Total B/S Value (int)
totalFee = 2202, // Total Fee (int)
totalSettlementAmount = -3217709, // Total Settlement Amount (int)
totalTax = 7412, // Total Tax (int)
currency = TWD // Currency (string)
},
// ... (omitted for brevity)
]
}
}