Skip to main content

Unrealized Gains and Loses

unrealized_gains_and_loses

Request Parameter

ParameterTypeMeaning
accountAccountAccount

Result Response

ParameterTypeMeaning
is_successboolInterface result
dataListUnrealizedData list is returned
messagestringis_success = False error description is returned

UnrealizedData Parameter

Return type : Object

ParameterTypeMeaning
datestringDate of inquiry
branch_nostringBranch number
stock_nostringSymbol
buy_sellBSActionBuy/Sell Type : BuySell (Note. Please refer to the infomation block below the table)
order_typeOrderTypeOrder Type : StockMarginShortDayTradeSBL Security Landing
cost_pricefloatHoding price
tradable_qtyintAvailable quantity
today_qtyintToday Share balacne
unrealized_profitintUnrealized profit
unrealized_lossintUnrealized 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)
},
...
]
}