Skip to main content

Settlement Inquiry

QuerySettlement

Input Parameters

ParameterTypeDescription
accountAccountAccount number
rangestringDate range, valid values: "0d" (Today), "3d"

Return Result

ParameterTypeDescription
is_successboolSuccess status
dataBankRemainReturns balance information
messagestringReturns error message when is_success = False

SettlementData Fields

Return type : Object

ParameterTypeDescription
> accountobjectObject
>> accountstringAccount number
>> branch_nostringBranch code
> detailslistObject
>> datestringQuery Date
>> settlement_datestring (Optional)Settlement Date (Null if no data)
>> buy_valueint (Optional)Buy Value (Null if no data)
>> buy_feeint (Optional)Buy Fee (Null if no data)
>> buy_settlementint (Optional)Buy Receivable/Payable (Null if no data)
>> buy_taxint (Optional)Buy Tax (Null if no data)
>> sell_valueint (Optional)Sell Value (Null if no data)
>> sell_feeint (Optional)Sell Fee (Null if no data)
>> sell_settlementint (Optional)Sell Receivable/Payable (Null if no data)
>> sell_taxint (Optional)Sell Tax (Null if no data)
>> total_bs_valueint (Optional)Total Buy/Sell Value (Null if no data)
>> total_feeint (Optional)Total Fee (Null if no data)
>> total_taxint (Optional)Total Tax (Null if no data)
>> total_settlement_amountint (Optional)Total Settlement Amount (Null if no data)
>> currencystring (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)
]
}
}