Пример #1
0
        public void Is_GetRate_Correct()
        {
            var assetPair = new AssetPair
            {
                Id               = "BTCUSD",
                BaseAssetId      = "BTC",
                QuotingAssetId   = "USD",
                Accuracy         = 3,
                InvertedAccuracy = 8
            };

            var x = _service.GetRate("BTC", assetPair, 10);

            Assert.Equal(0.1, x);
        }
        public Task <double> GetRate(string assetId, double price, [FromBody] AssetPair assetPair)
        {
            var rate = _rateCalculatorService.GetRate(assetId, assetPair, price);

            return(Task.FromResult(rate));
        }