Esempio n. 1
0
 def fill_buy_sell_order(order, market):
     return Order(market, order.get('id'),
                  Analyser.extract_type(order, market),
                  Analyser.extract_start_amount(order, market),
                  Analyser.extract_remaining_amount2(order, market),
                  Analyser.extract_price2(order, market),
                  Analyser.extract_status(order, market))
Esempio n. 2
0
    def test_extract_remaining_amount_unknown(self):
        amount = Analyser.extract_remaining_amount2({}, TOTO)

        assert amount == 0
Esempio n. 3
0
    def test_extract_remaining_amount_binance(self):
        amount = Analyser.extract_remaining_amount2(BINANCE_SELL_ORDER,
                                                    BINANCE)

        assert amount == 20
Esempio n. 4
0
    def test_extract_remaining_amount_liqui(self):
        amount = Analyser.extract_remaining_amount2(LIQUI_BUY_ORDER, LIQUI)

        assert amount == 10