Exemple #1
0
    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)
Exemple #2
0
 def getInstrumentTraits(self, instrument):
     return common.BTCTraits()