private async Task <decimal> GetResultOfTransaction(string transactionHash, string againstAddress) { using (var client = new BlockchainHttpClient()) { var result = await client.GetAsync <long>($"q/txresult/{transactionHash}/{againstAddress}"); return(BitcoinValue.FromSatoshis(result).GetBtc()); } }
public async Task <decimal> GetPrice() { var response = await _blockchainHttpClient.GetAsync <BitcoinPrice>(@"https://blockchain.info/ru/ticker"); return(response.USD.last); }