ListReceivedByAddress

Requires wallet support.

The listreceivedbyaddress RPC lists the total number of pai’s received by each address.

Parameter #1—the minimum number of confirmations a transaction must have to be counted

Name Type Presence Description
Confirmations number (int) Optional
(0 or 1)
The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1

Parameter #2—whether to include empty accounts

Name Type Presence Description
Include Empty bool Optional
(0 or 1)
Set to true to display accounts which have never received a payment. Set to false (the default) to only include accounts which have received a payment. Any account which has received a payment will be displayed even if its current balance is 0

Parameter #3—whether to include watch-only addresses in results

Name Type Presence Description
Include Empty bool Optional
(0 or 1)
Set to true to display accounts which have never received a payment. Set to false (the default) to only include accounts which have received a payment. Any account which has received a payment will be displayed even if its current balance is 0

Result—addresses, account names, balances, and minimum confirmations

Name Type Presence Description
result array Required
(exactly 1)
An array containing objects each describing a particular address

Address
object Optional
(0 or more)
An object describing an address
→ →
involvesWatchonly
bool Optional
(0 or 1)
Set to true if this address is a watch-only address which has received a spendable payment (that is, a payment with at least the specified number of confirmations and which is not an immature coinbase). Otherwise not returned
→ →
address
string (base58) Required
(exactly 1)
The address being described encoded in base58check
→ →
account
string Required
(exactly 1)
The account the address belongs to. May be the default account, an empty string ("")
→ →
amount
number (pai’s) Required
(exactly 1)
The total amount the address has received in pai’s
→ →
confirmations
number (int) Required
(exactly 1)
The number of confirmations of the latest transaction to the address. May be 0 for unconfirmed
→ →
label
string Required
(exactly 1)
The account the address belongs to. May be the default account, an empty string ("")
→ →
txids
array Required
(exactly 1)
An array of TXIDs belonging to transactions that pay the address
→ → →
TXID
string Optional
(0 or more)
The TXID of a transaction paying the address, encoded as hex in RPC byte order

Example

List addresses with balances confirmed by at least six blocks, including watch-only addresses:

pai-cli -testnet listreceivedbyaddress 6 false true

Result (edit to show only two entries):

[
    {
        "address" : "PaXVxzkruFZPidQjsDft9CW174Tr99xngu",
        "account" : "test1",
        "amount" : 1.99900000,
        "confirmations" : 55680,
        "label" : "test1",
        "txids" : [
            "4d71a6127796766c39270881c779b6e05183f2bf35589261e9572436356f287f",
            "997115d0cf7b83ed332e6c1f2e8c44f803c95ea43490c84ce3e9ede4b2e1605f"
        ]
    },
    {
        "involvesWatchonly" : true,
        "address" : "PFZPidQjsDft9CW174Tr99xnguJMPc84JA",
        "account" : "someone else's address2",
        "amount" : 0.00050000,
        "confirmations" : 34714,
        "label" : "someone else's address2",
        "txids" : [
            "99845fd840ad2cc4d6f93fafb8b072d188821f55d9298772415175c456f3077d"
        ]
    }
]

See also

  • ListReceivedByAccount: lists the total number of pai’s received by each account.
  • GetReceivedByAddress: returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions.
  • GetReceivedByAccount: returns the total amount received by addresses in a particular account from transactions with the specified number of confirmations. It does not count coinbase transactions.