Skip to main content

getreceivedbyaddress

Command#

pacprotocol-cli getreceivedbyaddress "address" ( minconf addlocked )

Returns the total amount received by the given address in transactions with at least minconf confirmations.

Arguments#

address *#

(string, required)

The PAC address for transactions.

minconf#

(numeric, optional, default=1)

Only include transactions confirmed at least this many times.

addlocked#

(bool, optional, default=false)

Whether to include transactions locked via InstantSend.

Examples#

The amount from transactions with at least 1 confirmation

pacprotocol-cli getreceivedbyaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG"

The amount including unconfirmed transactions, zero confirmations

pacprotocol-cli getreceivedbyaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" 0

The amount with at least 6 confirmations

pacprotocol-cli getreceivedbyaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" 6

As a json rpc call

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Result#

amount #(numeric) The total amount in PAC received at this address.

Running following help command

pacprotocol-cli help getreceivedbyaddress

Will produce following output:

getreceivedbyaddress "address" ( minconf addlocked )
Returns the total amount received by the given address in transactions with at least minconf confirmations.
Arguments:
1. "address" (string, required) The PAC address for transactions.
2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.
3. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.
Result:
amount (numeric) The total amount in PAC received at this address.
Examples:
The amount from transactions with at least 1 confirmation
> pacprotocol-cli getreceivedbyaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG"
The amount including unconfirmed transactions, zero confirmations
> pacprotocol-cli getreceivedbyaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" 0
The amount with at least 6 confirmations
> pacprotocol-cli getreceivedbyaddress "XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG" 6
As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/