Ejemplo n.º 1
0
        public void CreateAndExecuteNeoOrderSellAndCreateAndExcecuteCancelation_Test()
        {
            var pair   = "SWTH_NEO";
            var amount = 1.2M;
            var price  = .004M;
            var side   = Side.sell;
            var order  = _repoAuth.CreateNeoOrder(pair, side, price, amount, false).Result;

            Assert.NotNull(order);

            var executedOrder = _repoAuth.BroadcastOrder(order).Result;

            Assert.NotNull(executedOrder);

            var cancellation = _repoAuth.CreateCancellation(executedOrder).Result;

            Assert.NotNull(cancellation);

            var executedCancellation = _repoAuth.ExecuteCancellation(cancellation).Result;

            Assert.NotNull(executedCancellation);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// This is the second endpoint that must be called to cancel an order.
 /// After calling the CreateCancellation endpoint,
 /// you will receive a transaction in the response which must be signed.
 /// </summary>
 /// <param name="cancellation">Cancellation object</param>
 /// <returns>Order object</returns>
 public Order ExecuteCancellation(TransactionResponse cancellation)
 {
     return(_repository.ExecuteCancellation(cancellation).Result);
 }