self.assertEqual(D("0.00003003"), all_orders[1].rate)
- def create_order(symbol, type, action, amount, price=None):
+ def create_order(symbol, type, action, amount, price=None, account="exchange"):
self.assertEqual("limit", type)
if symbol == "ETH/BTC":
self.assertEqual("sell", action)
# Action 6
portfolio.Trade.prepare_orders(only="buy", compute_value=lambda x, y: x["ask"])
-
all_orders = portfolio.Trade.all_orders(state="pending")
self.assertEqual(3, len(all_orders))
self.assertEqual(portfolio.Amount("ETC", D("38.5")/3), all_orders[0].amount)