These docs are for v0.17.0. Click to read the latest docs for v19.0.0-redirect.

Address Index RPCs

GetAddressBalance

📘

Requires wallet support (unavailable on masternodes) and -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

NameTypePresenceDescription
addressesobjectRequired
(exactly 1)
An array of P2PKH or P2SH Dash address(es)
→Addressstring (base58)Required
(1 or more)
The base58check encoded address

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

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
An object listing the current balance and total amount received (including change), or an error if any address is invalid
→
balance
stringRequired
(exactly 1)
The current balance in duffs
→
balance_immature
stringRequired
(exactly 1)
The current immature balance in duffs
→
balance_spendable
stringRequired
(exactly 1)
The current spendable balance in duffs
→
received
stringRequired
(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 wallet support (unavailable on masternodes) and -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

NameTypePresenceDescription
addressesobjectRequired
(exactly 1)
An array of P2PKH or P2SH Dash address(es)
→Addressstring (base58)Required
(1 or more)
The base58check encoded address

Parameter #2---the start block height

NameTypePresenceDescription
startnumber (int)Optional
(exactly 1)
The start block height

Parameter #3---the end block height

NameTypePresenceDescription
endnumber (int)Optional
(exactly 1)
The end block height

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

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of JSON objects, with each object describing a transaction involving one of the requested addresses
→
Delta
objectRequired
(1 or more)
An object describing a particular address delta
→→
satoshis
numberRequired
(exactly 1)
The difference of duffs
→→
txid
stringRequired
(exactly 1)
The related txid
→→
blockindex
numberRequired
(exactly 1)
The related input or output index
→→
height
numberRequired
(exactly 1)
The block height
→→
address
stringRequired
(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 wallet support (unavailable on masternodes) and -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

NameTypePresenceDescription
addressesobjectRequired
(exactly 1)
An array of P2PKH or P2SH Dash address(es)
→Addressstring (base58)Required
(1 or more)
The base58check encoded address

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

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of JSON objects, with each object describing a transaction involving one of the requested addresses
→Mempool DeltasobjectRequired
(1 or more)
An object describing a particular mempool address delta
→→
address
stringRequired
(exactly 1)
The base58check encoded address
→→
txid
stringRequired
(exactly 1)
The related txid
→→
index
numberRequired
(exactly 1)
The related input or output index
→→
satoshis
numberRequired
(exactly 1)
The difference of duffs
→→
timestamp
stringRequired
(exactly 1)
The time the transaction entered the mempool (seconds)
→→
prevtxid
stringRequired
(exactly 1)
The previous txid (if spending)
→→
prevout
stringRequired
(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 wallet support (unavailable on masternodes) and -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

NameTypePresenceDescription
addressesobjectRequired
(exactly 1)
An array of P2PKH or P2SH Dash address(es)
→Addressstring (base58)Required
(1 or more)
The base58check encoded address

Parameter #2---the start block height

NameTypePresenceDescription
startnumber (int)Optional
(exactly 1)
The start block height

Parameter #3---the end block height

NameTypePresenceDescription
endnumber (int)Optional
(exactly 1)
The end block height

Result---information about txids for the address(es)

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of txids related to the requested address(es)
→
TXID
stringRequired
(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 wallet support (unavailable on masternodes) and -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

NameTypePresenceDescription
addressesobjectRequired
(exactly 1)
An array of P2PKH or P2SH Dash address(es)
→Addressstring (base58)Required
(1 or more)
The base58check encoded address

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

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of JSON objects, with each object describing a transaction involving one of the requested addresses
→Unspent outputsobjectRequired
(1 or more)
An object describing a particular unspent output for the requested address(es)
→→
address
stringRequired
(exactly 1)
The base58check encoded address
→→
txid
stringRequired
(exactly 1)
The output txid
→→
outputIndex
numberRequired
(exactly 1)
The output index
→→
script
stringRequired
(exactly 1)
The script hex encoded
→→
satoshis
numberRequired
(exactly 1)
The number of duffs of the output
→→
height
numberRequired
(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
  }
]

What’s Next