Realized P&L Summary
realized_gains_and_loses_summary
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 |
RealizedSummary Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| start_date | string | Summary start date |
| end_date | string | Summary end date |
| branch_no | string | Branch code |
| account | string | Account number |
| stock_no | string | Stock symbol |
| buy_sell | BSAction | Side: BUY, SELL |
| order_type | OrderType | Order Type: STOCK (Spot), MARGIN (Margin Buy), SHORT (Short Sell), DAY_TRADE (Day Trade), SBL (Securities Borrowing) |
| filled_qty | int | Filled quantity |
| filled_avg_price | double | Average filled price |
| realized_profit_and_loss | int | Realized P&L amount |
Request Example
auto realized_summary_response = sdk->accounting->realized_gains_and_loses_summary(target_account);
// With custom .cpp & hpp Output
if (realized_summary_response.is_success && realized_summary_response.data.has_value()) {
const auto& realized_list = *realized_summary_response.data;
for (const auto& item : realized_list) {
std::cout << item << std::endl;
}
}
Response Example
{
isSuccess = true,
message = ,
data = [
RealizedSummary{
startDate = 20230801, // Start Date (string)
endDate = 20230801, // End Date (string)
branchNo = 6460, // Branch Code (string)
account = 26, // Account Number (string)
stockNo = 1101, // Stock Symbol (string)
buySell = SELL, // Side (BSAction)
orderType = STOCK, // Order Type (OrderType)
filledQty = 3000, // Filled Quantity (int)
filledAvgPrice = 35.7, // Average Filled Price (double)
realizedProfitAndLoss = 34026 // Realized P&L Amount (int)
},
...
]
}