Ejemplo n.º 1
0
        // ReSharper disable UnusedMember.Local
        private static int GetTrade()
        {
            DtoTradeAnswer tradeAnswer = violinBtce.Trade(Pair.ltc_eur, TradeType.sell, 100m, 0.1m);

            Console.WriteLine(tradeAnswer);
            Console.ReadLine();

            return(tradeAnswer.OrderId);
        }
Ejemplo n.º 2
0
        public void Trade(string key, string secret, Pair pair, bool keyAndSecretAreSpecified)
        {
            // Pre requirements
            SetKeyAndSecretSpecificationRequirement(key, secret, keyAndSecretAreSpecified);

            // Arrange
            ViolinBtce violinBtce = keyAndSecretAreSpecified ? new ViolinBtce(key, secret) : new ViolinBtce();

            // Act
            DtoTradeAnswer result = violinBtce.Trade(Pair.ltc_usd, TradeType.sell, 100m, 0.1m);

            // Assert
            Assert.Greater(result.OrderId, 0);
        }