public async Task QuotesLatestTest()
        {
            CryptocurrencyQuotesResponse response = await this.client.QuotesLatestAsync(null, "eth", FiatCurrency.AUD);

            CryptocurrencyQuote ethInfo;

            if (!response.Data.TryGetValue("ETH", out ethInfo))
            {
                throw new Exception("ETH not found in response");
            }

            Assert.IsTrue(ethInfo.Quote["AUD"].Price != 0);
        }
Esempio n. 2
0
        public async Task QuotesLatest()
        {
            CryptocurrencyQuotesResponse singleResult = await this.client.GetCryptocurrencyQuotesLatest(new string[] { "BTC" });

            Assert.IsTrue(singleResult.Data.Count == 1);
            Assert.IsTrue(singleResult.Data["BTC"].Symbol.ToLower() == "btc");
            Assert.IsNotNull(singleResult.Data["BTC"].Quote[FiatCurrency.USD.ToString()]);

            CryptocurrencyQuotesResponse multiResult = await this.client.GetCryptocurrencyQuotesLatest(new string[] { "BTC", "ETH" }, FiatCurrency.AUD);

            Assert.IsTrue(multiResult.Data.Count == 2);
            Assert.IsTrue(multiResult.Data["ETH"].Symbol.ToLower() == "eth");
        }