Unrealized Gain and Loses
UnrealizedGainsAndLoses
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
Result Reponse
Parameter | Type | Meaning |
---|---|---|
isSuccess | bool | Interface result |
data | List | UnrealizedData list is returned |
message | string | isSuccess = False error description is returned |
UnrealizedData Response Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
date | string | Date of inquiry |
branchNo | string | Branch number |
stockNo | string | Symbol |
buySell | BsAction | Buy/Sell Type : Buy 、 Sell (Note. Please refer to the infomation block below the table) |
orderType | OrderType | Order Type : Stock 、 Margin 、 Short Short sale 、 DayTrade 、 SBL Security Landing |
costPrice | double | Hoding price |
tradableQty | int | Available quantity |
todayQty | int | Today Share balacne |
unrealizedProfit | int | Unrealized profit |
unrealizedLoss | int | Unrealized 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)
},
...
]
}