Maintenance Ratio Inquiry
Maintenance
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account number |
Return Result
| Parameter | Type | Description |
|---|---|---|
| is_success | bool | Success status |
| data | BankRemain | Returns balance information |
| message | string | Returns error message when is_success = False |
MaintenanceData Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| maintenance_data | list | Object |
| > date | string | Query Date |
| > branch_no | string | Branch code |
| > account | string | Account number |
| > maintenance_summary | list | Object |
| >> margin_value | int | Total Margin Value |
| >> shortsell_value | int | Total Short Sell Value |
| >> shortsell_margin | int | Total Short Sell Margin |
| >> collateral | int | Collateral |
| >> margin_loan_amt | int | Total Margin Loan Amount |
| >> maintenance_ratio | double | Overall Maintenance Ratio |
| > maintenance_detail | list | Object |
| >> stock_no | string | Stock Symbol |
| >> order_no | string | Order Book Number |
| >> order_type | OrderType | Order Type: STOCK, MARGIN, SHORT, DAY_TRADE, SBL |
| >> quantity | int | Quantity Held |
| >> price | double | Calculation Price |
| >> cost_price | double | Cost Price |
| >> shortsell_margin | int | Short Sell Margin |
| >> collateral | int | Collateral |
| >> margin_loan_amt | int | Margin Loan Amount |
| >> maintenance_ratio | double | Maintenance Ratio |
| >> collateral_interest | double | Collateral Interest |
| >> margin_interest | double | Margin Loan Interest |
| >> shortsell_interest | double | Short 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
},
...
],
}
}