/// <summary> /// If [account] is not specified, returns the server's total available balance. /// If [account] is specified, returns the balance in the account. /// </summary> /// <param name="account">The account to get the balance for.</param> /// <returns>The balance of the account or the total wallet.</returns> public decimal GetBalance(string account = "") { var epStr = string.IsNullOrEmpty(account) ? MakeRequest <string>("getbalance", EmptyString) : MakeRequest <string>("getbalance", account); return(EpUtil.EpToDecimal(epStr)); }
/// <summary> /// Returns the total amount received by bitcoinaddress in transactions with at /// least [minconf] confirmations. While some might consider this obvious, value /// reported by this only considers *receiving* transactions. It does not check /// payments that have been made *from* this address. In other words, this is /// not "getaddressbalance". Works only for addresses in the local wallet, /// external addresses will always show 0. /// </summary> /// <param name="bitcoinAddress">The address to get the balance for.</param> /// <param name="minconf">Minimum amount of confirmations before a transaction is included.</param> /// <returns>The total amount received by the bitcoinaddress.</returns> public decimal GetReceivedByAddress(string bitcoinAddress, int minconf = 1) { var epStr = MakeRequest <string>("getreceivedbyaddress", bitcoinAddress, minconf); return(EpUtil.EpToDecimal(epStr)); }