Esempio n. 1
0
        public void PlaceAndGetOrderAndGetOpenAndCancelOrderTest()
        {
            var pair     = "BTC-TRX";
            var quantity = 100.0M;
            var price    = 0.00009999M;
            var side     = Side.SELL;

            var id = _repo.PlaceOrder(pair, side, quantity, price).Result;

            Assert.NotNull(id);

            var order = _repo.GetOrder(id).Result;

            Assert.NotNull(order);

            var orders = _repo.GetOpenOrders(pair).Result;

            Assert.NotNull(orders);

            var status = _repo.CancelOrder(id).Result;

            Assert.True(status);
        }
Esempio n. 2
0
 /// <summary>
 /// Cancel an order.
 /// </summary>
 /// <param name="id">OpenOrder id</param>
 /// <returns>Boolean of cancel attempt</returns>
 public bool CancelOrder(string id)
 {
     return(_repository.CancelOrder(id).Result);
 }