public void KrakenMinimumBuyTest_Price() { Kraken kraken = new Kraken(); //Amount doesn't do anything in this situation; just picked the minimum amount to be safe kraken.Buy(kraken.MinimumBitcoinOrderAmount, -1m); }
public void KrakenMinimumBuyTest_Amount() { Kraken kraken = new Kraken(); //Price doesn't do anything in this situation; just picked an absurdely low price to buy at kraken.Buy(kraken.MinimumBitcoinOrderAmount - 1, 1m); }
public void KrakenBuySellQueryDeleteTest() { Kraken kraken = new Kraken(FiatType.Usd); string buyOrderId; string sellorderId; //First, insert a buy and 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. Note, with this amount of btc, need to sell at at least $10 to meet the minimum order requirements. buyOrderId = kraken.Buy(kraken.MinimumBitcoinOrderAmount, 10m); //Sell at a really high price so the order doesn't actually get executed. sellorderId = kraken.Sell(kraken.MinimumBitcoinOrderAmount, 9999m); //Both orders should still be open Assert.IsFalse(kraken.IsOrderFulfilled(buyOrderId)); Assert.IsFalse(kraken.IsOrderFulfilled(sellorderId)); //Now delete both orders. If there are any errors with either of these operations, //an exception will be thrown. kraken.DeleteOrder(buyOrderId); kraken.DeleteOrder(sellorderId); }