Profit loss detail
Query account of profit loss detail
In
api.list_profit_loss_detail?
Out
Signature:
api.list_profit_loss_detail(
account: shioaji.account.Account = None,
detail_id: int = 0,
timeout: int = 5000,
cb: Callable[[List[shioaji.position.ProfitLossDetail]], NoneType] = None,
)
Docstring:
query account of profit loss detail
Args:
account (:obj:Account):
choice the account from listing account (Default: stock account)
detail_id (int): the id is from ProfitLoss object, ProfitLoss is from list_profit_loss
In
api.list_profit_loss_detail(api.stock_account,2)
Out
[ProfitLossDetail(date='2020-05-22', cond='Cash', code='2890', quantity=1, price=10.1, cost=9100, dseq='ID111', rep_margintrading_amt=0, rep_collateral=0, rep_margin=0, fee=20, interest=0, tax=0, shortselling_fee=0, currency='NTD')]
Out
date | cond | code | quantity | price | cost | dseq | rep_margintrading_amt | rep_collateral | rep_margin | fee | interest | tax | shortselling_fee | currency |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2020-05-22 | StockOrderCond.Cash | 2890 | 1 | 10.1 | 9100 | ID111 | 0 | 0 | 0 | 20 | 0 | 0 | 0 | NTD |
Attributes:
date (str): trade date.
cond (StockOrderCond): {Cash, Netting, MarginTrading, ShortSelling}
code (str): contract id.
quantity (int): quantity.
price (float): price.
cost (int): cost of price.
dseq (str): detail seqno no.
rep_margintrading_amt (int): repay amount of margin trading.
rep_collateral (int): repay collateral.
rep_margin (int): repay margin.
fee (int): fee.
interest (int): interest.
tax (int): trading tax.
shortselling_fee (int): fee of short selling.
currency (str): {NTD, USD, HKD, EUR, CAD, BAS}