code: def cancel(self):
          
  
          self.cancel_amount = self.amount - self.trade_amount
          if self.trade_amount == 0:
              # 未交易  直接订单全撤
              self._status = ORDER_STATUS.CANCEL_ALL
          else:
              # 部分交易 剩余订单全撤
              self._status = ORDER_STATUS.CANCEL_PART
docs: 撤单
  
          Arguments:
              amount {int} -- 撤单数量