Realized P&L (Detail)
realized_gains_and_loses
Input Parameters
| Parameter | Type | Meaning |
|---|---|---|
| account | Account | Account |
Result
| Parameter | Type | Meaning |
|---|---|---|
| is_success | bool | Whether successful |
| data | List | Realized list is returned |
| message | string | Error message returned when is_success = false |
Realized Example
Return type : Object
| Parameter | Type | Meaning |
|---|---|---|
| date | string | Data date |
| branch_no | string | Branch number |
| account | string | Account |
| stock_no | string | Symbol |
| buy_sell | BSAction | Buy/Sell Type : Buy, Sell |
| filled_qty | int | Filled quantity |
| filled_price | float | Filled price |
| order_type | OrderType | Order Type : Stock, Margin, Short, DayTrade, SBL Securities borrowing and lending |
| realized_profit | int | Realized profit |
| realized_loss | int | Realized loss |
Request Example
sdk.accounting.realized_gains_and_loses(account)
Response Example
Result {
is_success: True,
message: None,
data : [ Realized {
date: "2023/10/17", # Data date (string)
branch_no: "6460", # Branch code (string)
account: "26", # Account (string)
stock_no: "1101", # Symbol (string)
buy_sell: Sell, # Buy/sell side (BSAction)
filled_qty: 1000, # Filled quantity (int)
filled_price: 35.0, # Fill price (float)
order_type: Stock, # Order Type (OrderType)
realized_profit: 0, # Realized profit amount (int)
realized_loss: 203 # Realized loss amount (int)
},
...
]
}