Beispiel #1
0
        public void StartServer()
        {
            var host = new AppHost();

            var startTime = DateTime.Now;

            host.Start();

            Thread.Sleep(2 * 60 * 1000);

            IExchangeRepertory client = new ExchangeRepertory();
            var rate = client.GetTodayRates();

            Assert.IsTrue(rate[0].LastChangeTime.ToFileTimeUtc() > startTime.ToFileTimeUtc(), "Rate error.");

            IKrakenRepertory krakenClient = new KrakenRepertory();
            var ticker = krakenClient.GetTicker();

            Assert.IsTrue(ticker[0].LastChangeTime.ToFileTimeUtc() > startTime.ToFileTimeUtc(), "Ticker error.");

            var balance = krakenClient.GetBalance();

            Assert.IsTrue(balance[0].LastChangeTime.ToFileTimeUtc() > startTime.ToFileTimeUtc(), "Balance error.");

            var booking = krakenClient.GetBooking("BTC");

            Assert.IsTrue(booking[0].LastChangeTime.ToFileTimeUtc() > startTime.ToFileTimeUtc(), "Booking error.");

            host.Dispose();
        }
Beispiel #2
0
        public void ReloadKrakenOrders()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var istrue = client.ReloadOrder();

            Assert.IsTrue(istrue, "Reload Orders error");
        }
Beispiel #3
0
        public void ReloadKrakenBookings()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var ticker = client.ReloadBooking();

            Assert.IsTrue(ticker, "Reload Balance error");
        }
Beispiel #4
0
        public void ReloadKrakenTicker()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var ticker = client.ReloadTicker();

            Assert.IsTrue(ticker, "Reload Ticker error");
        }
Beispiel #5
0
        public void GetTicker()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var ticker = client.GetTicker();

            Assert.IsNotNull(ticker, "Ticker error.");
            Assert.IsTrue(ticker.Count > 0, "Ticker emty");
        }
Beispiel #6
0
        public void GetKrakenOrders()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var orders = client.GetOrder();

            Assert.IsNotNull(orders, "Balance error.");
            Assert.IsTrue(orders.Count > 0, "Orders emty");
        }
Beispiel #7
0
        public void GetKrakenBookings()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var ticker = client.GetBooking("BTC");

            Assert.IsNotNull(ticker, "Balance error.");
            Assert.IsTrue(ticker.Count > 0, "Balance emty");
        }
Beispiel #8
0
        public void GetKrakenBalances()
        {
            IKrakenRepertory client = new KrakenRepertory();

            var balance = client.GetBalance();

            Assert.IsNotNull(balance, "Balance error.");
            Assert.IsTrue(balance.Count > 0, "Balance emty");
        }