Skip to main content

Realized P&L Detail Inquiry

realized_gains_and_loses

Input Parameters

ParameterTypeDescription
accountAccountAccount number

Return Result

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

Realized Fields

Return type : Object

ParameterTypeDescription
datestringData Date
branch_nostringBranch code
accountstringAccount number
stock_nostringStock symbol
buy_sellBSActionSide: BUY, SELL
filled_qtyintFilled Quantity
filled_pricedoubleFilled Price
order_typeOrderTypeOrder Type: STOCK, MARGIN, SHORT, DAY_TRADE, SBL
realized_profitintRealized Profit
realized_lossintRealized Loss

Request Example

auto realized_response = sdk->accounting->realized_gains_and_loses(target_account);

// With custom .cpp & hpp Output
if (realized_response.is_success && realized_response.data.has_value()) {
for (const auto& r : *realized_response.data) {
std::cout << r << std::endl;
}
}

Response Example

{
isSuccess = true,
message = ,
data =[
Realized{
date = 2023/08/16, // Data Date (string)
branchNo = 6460, // Branch Code (string)
account = 26, // Account Number (string)
stockNo = 1101, // Stock Symbol (string)
buySell = SELL, // Side (BSAction)
filledQty = 1000, // Filled Quantity (int)
filledPrice = 36.5, // Filled Price (double)
orderType = STOCK, // Order Type (OrderType)
realizedProfit = 36339, // Realized Profit (int)
realizedLoss = 0 // Realized Loss (int)
},
...
]
}