Skip to main content

Unrealized Gain and Loses

UnrealizedGainsAndLoses

Request Parameter

ParameterTypeMeaning
accountAccountAccount

Result Reponse

ParameterTypeMeaning
isSuccessboolInterface result
dataListUnrealizedData list is returned
messagestringisSuccess = False error description is returned

UnrealizedData Response Parameter

Return type : Object

ParameterTypeMeaning
datestringDate of inquiry
branchNostringBranch number
stockNostringSymbol
buySellBsActionBuy/Sell Type : BuySell (Note. Please refer to the infomation block below the table)
orderTypeOrderTypeOrder Type : StockMarginShort Short sale 、 DayTradeSBL Security Landing
costPricedoubleHoding price
tradableQtyintAvailable quantity
todayQtyintToday Share balacne
unrealizedProfitintUnrealized profit
unrealizedLossintUnrealized loss
info

For spot trades, buySell is always Buy and quantity could be positive or negative to denote the net position. For margin trades,buySell could be Buy or Sell depends on the trade direction.

Request Example

Console.WriteLine(sdk.Accounting.UnrealizedGainsAndLoses(account));

Response Example

{
isSuccess = True,
message = ,
data = [
UnrealizedSummary{
date = 2021/08/09, // Date of inquiry (string)
account = 26, // Account (int)
branchNo = 6460, // Branch number (int)
stockNo = 2303, // Symbol (string)
buySell = Buy, // Buy/Sell type (BsAction)
orderType = Margin, // Order type (OrderType)
costPrice = 50.0, // Holding price (double)
tradableQty = 1000, // Available quantity (int)
todayQty = 1000, // Today Share balance (int)
unrealizedProfit = 45200, // Unrealized profit (int)
unrealizedLoss = 0 // Unrealized loss (int)
},
...
]
}