예제 #1
0
    def set_commission(self, commission):
        if not isinstance(commission, (PerShare, PerTrade, PerDollar)):
            raise UnsupportedCommissionModel()

        if self.initialized:
            raise OverrideCommissionPostInit()
        self.commission = commission
예제 #2
0
 def set_commission(self, commission):
     if self.initialized:
         raise OverrideCommissionPostInit()
     self.commission = commission