Skip to main content

已實現損益彙總

realized_gains_and_loses_summary

輸入參數

參數類別說明
accountAccount帳號

Result 回傳

參數類別說明
is_successbool是否成功
dataList回傳已實現彙總資訊
messagestring當is_success = false 回傳錯誤訊息

已實現彙總 RealizedSummary 欄位

Return type : Object

參數類別說明
start_datestring彙總起始日
end_datestring彙總截止日
branch_nostring分公司代號
accountstring帳號
stock_nostring股票代號
buy_sellBSAction買賣別 : Buy 買 、 Sell
order_typeOrderType委託單類型 : Stock 現股 、 Margin 融資 、 Short 融券 、 DayTrade 現股當沖 、 SBL 借券賣出
filled_qtyint成交股數
filled_avg_pricefloat成交均價
realized_profit_and_lossint已實現損益金額

請求範例

sdk.accounting.realized_gains_and_loses_summary(account)

回傳範例

Result {
is_success: True,
message: None,
data : [RealizedSummary{
start_date: "20231011", # 彙總起始日 (string)
end_date: "20231011", # 彙總截止日 (string)
branch_no: "6460", # 分公司代號 (string)
account: "26", # 帳號 (string)
stock_no: "1101", # 股票代號 (string)
buy_sell: Sell, # 買賣別 (BSAction)
order_type: Stock, # 委託單類型 (OrderType)
filled_qty: 1000, # 成交股數 (int)
filled_avg_price: 35.0, # 成交均價 (float)
realized_profit_and_loss: -203 # 已實現損益金額 (int)
},
...
]
}