public async Task <ActionResult <decimal> > GetAddressBalance() { string accountIdString = User.FindFirstValue(ClaimTypes.NameIdentifier); if (accountIdString == null) { return(BadRequest("AccountId missing from request")); } int accountId = int.Parse(accountIdString); BitcoinWitPubKeyAddress address = await _bitcoin.GetDepositAddress(accountId); Money result = await _blockchain.GetAddressBalance(address); return(result.ToDecimal(MoneyUnit.BTC)); }