Esempio n. 1
0
 def fill_fetch_order(order, market):
     return Order(market, order.get('id'),
                  Analyser.extract_type(order, market),
                  Analyser.extract_start_amount(order, market),
                  Analyser.extract_remaining_amount_order(order, market),
                  Analyser.extract_price2(order, market),
                  Analyser.extract_status_order(order, market))
Esempio n. 2
0
    def test_extract_type_binance_order(self):
        type = Analyser.extract_type(BINANCE_FETCH_SELL_ORDER, BINANCE)

        assert type == Types.SELL
Esempio n. 3
0
    def test_extract_type_liqui_order(self):
        type = Analyser.extract_type(LIQUI_FETCH_BUY_ORDER, LIQUI)

        assert type == Types.BUY
Esempio n. 4
0
    def test_extract_type_unknown(self):
        type = Analyser.extract_type({}, TOTO)

        assert type == Types.UNKNOWN