Get Account Address

Requires wallet support.

The getaccountaddress RPC returns the current pai address for receiving payments to this account. If the account doesn’t exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address.

getaccountaddress will be removed in a later version of pai Core. Use the RPCs listed in the See Also subsection below instead.

Parameter #1—an account name

Name Type Presence Description
Account string Required
(exactly 1)
The name of an account. Use an empty string (“”) for the default account. If the account doesn’t exist, it will be created

Result—a pai address

Name Type Presence Description
result string (base58) Required
(exactly 1)
An address, belonging to the account specified, which has not yet received any payments


Get an address for the default account:

pai-cli -testnet getaccountaddress ""



See also

  • GetNewAddress: returns a new pai address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
  • GetRawChangeAddress: returns a new pai address for receiving change. This is for use with raw transactions, not normal use.
  • GetAddressesByAccount: returns a list of every address assigned to a particular account.