ibapi.commission_and_fees_report

Copyright (C) 2024 Interactive Brokers LLC. All rights reserved. This code is subject to the terms and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable.

 1"""
 2Copyright (C) 2024 Interactive Brokers LLC. All rights reserved. This code is subject to the terms
 3 and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable.
 4"""
 5
 6from ibapi.object_implem import Object
 7from ibapi.utils import intMaxString
 8from ibapi.utils import floatMaxString
 9
10
11class CommissionAndFeesReport(Object):
12    def __init__(self):
13        self.execId = ""
14        self.commissionAndFees = 0.0
15        self.currency = ""
16        self.realizedPNL = 0.0
17        self.yield_ = 0.0
18        self.yieldRedemptionDate = 0  # YYYYMMDD format
19
20    def __str__(self):
21        return (
22            "ExecId: %s, CommissionAndFees: %s, Currency: %s, RealizedPnL: %s, Yield: %s, YieldRedemptionDate: %s"
23            % (
24                self.execId,
25                floatMaxString(self.commissionAndFees),
26                self.currency,
27                floatMaxString(self.realizedPNL),
28                floatMaxString(self.yield_),
29                intMaxString(self.yieldRedemptionDate),
30            )
31        )
class CommissionAndFeesReport(ibapi.object_implem.Object):
12class CommissionAndFeesReport(Object):
13    def __init__(self):
14        self.execId = ""
15        self.commissionAndFees = 0.0
16        self.currency = ""
17        self.realizedPNL = 0.0
18        self.yield_ = 0.0
19        self.yieldRedemptionDate = 0  # YYYYMMDD format
20
21    def __str__(self):
22        return (
23            "ExecId: %s, CommissionAndFees: %s, Currency: %s, RealizedPnL: %s, Yield: %s, YieldRedemptionDate: %s"
24            % (
25                self.execId,
26                floatMaxString(self.commissionAndFees),
27                self.currency,
28                floatMaxString(self.realizedPNL),
29                floatMaxString(self.yield_),
30                intMaxString(self.yieldRedemptionDate),
31            )
32        )
execId
commissionAndFees
currency
realizedPNL
yield_
yieldRedemptionDate