def testInstrumentTraits(self): traits = common.BTCTraits() self.assertEqual(traits.roundQuantity(0), 0) self.assertEqual(traits.roundQuantity(1), 1) self.assertEqual(traits.roundQuantity(1.1 + 1.1 + 1.1), 3.3) self.assertEqual(traits.roundQuantity(1.1 + 1.1 + 1.1 - 3.3), 0) self.assertEqual(traits.roundQuantity(0.00441376), 0.00441376) self.assertEqual(traits.roundQuantity(0.004413764), 0.00441376)
def getInstrumentTraits(self, instrument): return common.BTCTraits()