Address Index RPCs#

GetAddressBalance#

📘

Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.

The getaddressbalance RPC returns the balance for address(es).

Parameter #1—an array of addresses

Name

Type

Presence

Description

addresses

object

Required
(exactly 1)

An array of P2PKH or P2SH Dash address(es)

→Address

string (base58)

Required
(1 or more)

The base58check encoded address

Result—the current balance in duffs and the total number of duffs received (including change)

Name

Type

Presence

Description

result

object

Required
(exactly 1)

An object listing the current balance and total amount received (including change), or an error if any address is invalid

→
balance

string

Required
(exactly 1)

The current balance in duffs

→
balance_immature

string

Required
(exactly 1)

The current immature balance in duffs

→
balance_spendable

string

Required
(exactly 1)

The current spendable balance in duffs

→
received

string

Required
(exactly 1)

The total number of duffs received (including change)

Example from Dash Core 0.17.0

Get the balance for an address:

dash-cli getaddressbalance '{"addresses": ["yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"]}'

Result:

{
  "balance": 876020488,
  "balance_immature": 776020488,
  "balance_spendable": 100000000,
  "received": 876020488
}

See also

  • GetBalance: gets the balance in decimal dash across all accounts or for a particular account.

  • GetUnconfirmedBalance: returns the wallet’s total unconfirmed balance.

GetAddressDeltas#

📘

Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.

The getaddressdeltas RPC returns all changes for an address.

Parameter #1—an array of addresses

Name

Type

Presence

Description

addresses

object

Required
(exactly 1)

An array of P2PKH or P2SH Dash address(es)

→Address

string (base58)

Required
(1 or more)

The base58check encoded address

Parameter #2—the start block height

Name

Type

Presence

Description

start

number (int)

Optional
(exactly 1)

The start block height

Parameter #3—the end block height

Name

Type

Presence

Description

end

number (int)

Optional
(exactly 1)

The end block height

Result—information about all changes for the address(es)

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of JSON objects, with each object describing a transaction involving one of the requested addresses

→
Delta

object

Required
(1 or more)

An object describing a particular address delta

→→
satoshis

number

Required
(exactly 1)

The difference of duffs

→→
txid

string

Required
(exactly 1)

The related txid

→→
blockindex

number

Required
(exactly 1)

The related input or output index

→→
height

number

Required
(exactly 1)

The block height

→→
address

string

Required
(exactly 1)

The base58check encoded address

Example from Dash Core 0.12.2

Get the deltas for an address:

dash-cli getaddressdeltas '{"addresses": ["yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"], "start":5000, "end":7500}'

Result:

[
  {
    "satoshis": 10000100,
    "txid": "1fe86e463a9394d4ccd9a5ff1c6b483c95b4350ffdb055b55dc3615111e977de",
    "index": 18,
    "blockindex": 1,
    "height": 6708,
    "address": "yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"
  },
  {
    "satoshis": -10000100,
    "txid": "6cb4379eec45cd3bb08b8f4c3a101b8cd89795e24f2cb8288a9941a85fb114cf",
    "index": 0,
    "blockindex": 1,
    "height": 7217,
    "address": "yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"
  }
]

GetAddressMempool#

📘

Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.

The getaddressmempool RPC returns all mempool deltas for an address.

Parameter #1—an array of addresses

Name

Type

Presence

Description

addresses

object

Required
(exactly 1)

An array of P2PKH or P2SH Dash address(es)

→Address

string (base58)

Required
(1 or more)

The base58check encoded address

Result—information about mempool deltas for the address(es)

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of JSON objects, with each object describing a transaction involving one of the requested addresses

→Mempool Deltas

object

Required
(1 or more)

An object describing a particular mempool address delta

→→
address

string

Required
(exactly 1)

The base58check encoded address

→→
txid

string

Required
(exactly 1)

The related txid

→→
index

number

Required
(exactly 1)

The related input or output index

→→
satoshis

number

Required
(exactly 1)

The difference of duffs

→→
timestamp

string

Required
(exactly 1)

The time the transaction entered the mempool (seconds)

→→
prevtxid

string

Required
(exactly 1)

The previous txid (if spending)

→→
prevout

string

Required
(exactly 1)

The previous transaction output index (if spending)

Example from Dash Core 0.12.2

Get the deltas for an address:

dash-cli getaddressmempool '{"addresses": ["yVcYtcKd3nSi85JFtE8ZSDPimj3VMTJB8k"]}'

Result:

[
  {
    "address": "yVcYtcKd3nSi85JFtE8ZSDPimj3VMTJB8k",
    "txid": "e53d871df8b26116fbc1b766172323f9c477375133eec8ea5c66f1867a61a533",
    "index": 1,
    "satoshis": 100000000000,
    "timestamp": 1573753889
  }
]

GetAddressTxids#

📘

Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.

The getaddresstxids RPC returns the txids for an address(es).

Parameter #1—an array of addresses

Name

Type

Presence

Description

addresses

object

Required
(exactly 1)

An array of P2PKH or P2SH Dash address(es)

→Address

string (base58)

Required
(1 or more)

The base58check encoded address

Parameter #2—the start block height

Name

Type

Presence

Description

start

number (int)

Optional
(exactly 1)

The start block height

Parameter #3—the end block height

Name

Type

Presence

Description

end

number (int)

Optional
(exactly 1)

The end block height

Result—information about txids for the address(es)

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of txids related to the requested address(es)

→
TXID

string

Required
(1 or more)

The transaction id

Example from Dash Core 0.12.2

Get the deltas for an address:

dash-cli getaddresstxids '{"addresses": ["yWjoZBvnUKWhpKMbBkVVnnMD8Bzno9j6tQ"], "start":5000, "end":7500}'

Result:

[
  "1fe86e463a9394d4ccd9a5ff1c6b483c95b4350ffdb055b55dc3615111e977de",
  "6cb4379eec45cd3bb08b8f4c3a101b8cd89795e24f2cb8288a9941a85fb114cf"
]

GetAddressUtxos#

📘

Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.

The getaddressutxos RPC returns all unspent outputs for an address.

Parameter #1—an array of addresses

Name

Type

Presence

Description

addresses

object

Required
(exactly 1)

An array of P2PKH or P2SH Dash address(es)

→Address

string (base58)

Required
(1 or more)

The base58check encoded address

Result—information about unspent outputs for the address(es)

Name

Type

Presence

Description

result

array

Required
(exactly 1)

An array of JSON objects, with each object describing a transaction involving one of the requested addresses

→Unspent outputs

object

Required
(1 or more)

An object describing a particular unspent output for the requested address(es)

→→
address

string

Required
(exactly 1)

The base58check encoded address

→→
txid

string

Required
(exactly 1)

The output txid

→→
outputIndex

number

Required
(exactly 1)

The output index

→→
script

string

Required
(exactly 1)

The script hex encoded

→→
satoshis

number

Required
(exactly 1)

The number of duffs of the output

→→
height

number

Required
(exactly 1)

The block height

Example from Dash Core 0.12.2

Get the unspent outputs for an address:

dash-cli getaddressutxos '{"addresses": ["yLeC3F9UxJmFaRaf5yzH7FDc7RdvBasi84"]}'

Result:

[
  {
    "address": "yLeC3F9UxJmFaRaf5yzH7FDc7RdvBasi84",
    "txid": "ef7bcd083db8c9551ca295698c3b7a6811288fae9944018d2a660a0f939bdb35",
    "outputIndex": 0,
    "script": "76a914038b8a73338c8f9c22024338198d63ff7c4cb4c088ac",
    "satoshis": 1000010000,
    "height": 7683
  }
]