Unrealized Gains and Loses
unrealized_gains_and_loses
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
Result Response
Parameter | Type | Meaning |
---|---|---|
is_success | bool | Interface result |
data | List | UnrealizedData list is returned |
message | string | is_success = False error description is returned |
UnrealizedData Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
date | string | Date of inquiry |
branch_no | string | Branch number |
stock_no | string | Symbol |
buy_sell | BSAction | Buy/Sell Type : Buy 、 Sell (Note. Please refer to the infomation block below the table) |
order_type | OrderType | Order Type : Stock 、 Margin 、 Short 、 DayTrade 、 SBL Security Landing |
cost_price | float | Hoding price |
tradable_qty | int | Available quantity |
today_qty | int | Today Share balacne |
unrealized_profit | int | Unrealized profit |
unrealized_loss | int | Unrealized loss |
info
For spot trades, buy_sell is always Buy
and quantity could be positive or negative to denote the net position. For margin trades,buy_sell could be Buy
or Sell
depends on the trade direction.
Request Example
sdk.accounting.unrealized_gains_and_loses(account)
Response Example
Result {
is_success: True,
message: None,
data :[
UnrealizedData{
date: "2021/08/09", # Date of inquiry (string)
account: "26", # Account (string)
branch_no: "6460", # Branch number (string)
stock_no: "2303", # Symbol (string)
buy_sell: Buy, # Buy/Sell type (BSAction)
order_type: Margin, # Order type (OrderType)
cost_price: 50.0, # Cost price (float)
tradable_qty: 1000, # Tradable quantity (int)
today_qty: 1000, # Today's balance (int)
unrealized_profit: 48650, # Unrealized profit (int)
unrealized_loss: 0 # Unrealized loss (int)
},
...
]
}