I have:

posSize = int(self.CalculateOrderQuantity(self.symbol, 0.02))

and

newTicket = self.StopMarketOrder(self.symbol, posSize*(-1), stopPrice)

Why does CalculateOrderQuantity return an decimal type when MarketOrder wants integer as input?

Does anyone know how i can convert posSize to integer so i can get m MarketOrder working?