public void OkCoinSellCostRoundTest() { OkCoin okcoin = new OkCoin(); Assert.IsTrue(okcoin.ApplyFeeToSellCost(0.01m * 430.63m) == 4.2976m); Assert.IsTrue(okcoin.ApplyFeeToSellCost(0.014m * 371.76m) == 5.1941m); }
public void OkCoinBalanceUpdateTest() { OkCoin okCoin = new OkCoin(); //If there is any problem connecting to the exchange, this will throw an error. okCoin.UpdateBalances(); }
public void OkCoinUpdateOrderBookTest() { OkCoin okCoin = new OkCoin(); //If there is any problem connecting to the exchange, this will throw an error. okCoin.UpdateOrderBook(1); //This assumes that the exchange has at least 1 order on each side. Technically this can give a false negative, but it's unlikely. Assert.IsTrue(okCoin.OrderBook.Asks.Count == 1); Assert.IsTrue(okCoin.OrderBook.Bids.Count == 1); }
public void OkCoinSellQueryDeleteTest() { OkCoin okCoin = new OkCoin(); string sellorderId; //First, insert a sell order. If there are any errors with either of these operations, //an exception will be thrown. //Buy at a really low price to the order doesn't actually get executed. sellorderId = okCoin.Sell(okCoin.MinimumBitcoinOrderAmount, 999m); //Both orders should still be open Assert.IsFalse(okCoin.IsOrderFulfilled(sellorderId)); //Now delete the order. If there is an error, an exception will be thrown. okCoin.DeleteOrder(sellorderId); }
public void OkCoinGetAllOpenOrdersTest() { OkCoin okcoin = new OkCoin(); object result = okcoin.GetAllOpenOrders(); }