Skip to main content

Maintenance Ratio Inquiry

Maintenance

Input Parameters

ParameterTypeDescription
accountAccountAccount number

Return Result

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

MaintenanceData Fields

Return type : Object

ParameterTypeDescription
maintenance_datalistObject
> datestringQuery Date
> branch_nostringBranch code
> accountstringAccount number
> maintenance_summarylistObject
>> margin_valueintTotal Margin Value
>> shortsell_valueintTotal Short Sell Value
>> shortsell_marginintTotal Short Sell Margin
>> collateralintCollateral
>> margin_loan_amtintTotal Margin Loan Amount
>> maintenance_ratiodoubleOverall Maintenance Ratio
> maintenance_detaillistObject
>> stock_nostringStock Symbol
>> order_nostringOrder Book Number
>> order_typeOrderTypeOrder Type: STOCK, MARGIN, SHORT, DAY_TRADE, SBL
>> quantityintQuantity Held
>> pricedoubleCalculation Price
>> cost_pricedoubleCost Price
>> shortsell_marginintShort Sell Margin
>> collateralintCollateral
>> margin_loan_amtintMargin Loan Amount
>> maintenance_ratiodoubleMaintenance Ratio
>> collateral_interestdoubleCollateral Interest
>> margin_interestdoubleMargin Loan Interest
>> shortsell_interestdoubleShort Sell Margin Interest

Request Example

auto maintenance_response = sdk->accounting->maintenance(target_account);
if (maintenance_response.is_success){
// With custom .cpp & hpp Output
std::cout << maintenance_response.data.value() << std::endl;
}

回傳範例

{ 
isSuccess = true,
message = ,
data = MaintenanceData {
date = 2024/02/27,
branchNo = 6460,
account = 26,
maintenanceSummary = MaintenanceSummary {
marginValue = 3135000,
shortsellValue = 0,
shortsellMargin = 0,
collateral = 0,
marginLoanAmt = 1494000,
maintenanceRatio = 209.83
},
maintenanceDetail = [{
stockNo = 2603,
orderNo = x4580,
orderType = Stock,
quantity = 10000,
price = 152.5,
costPrice = 119,
shortsellMargin = 0,
collateral = 0,
marginLoanAmt = 0,
maintenanceRatio = 213.58,
collateralInterest = 0,
marginInterest = 20818,
shortsellInterest = 0
},
...
],
}
}