Address Index RPCs#
GetAddressBalance#
Note
Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.
Changed in version 24.0.0: The address index is now built in the background. While it is syncing, this RPC returns an Address index is syncing error. Use the getindexinfo RPC to check its progress.
The getaddressbalance RPC returns the balance for address(es).
Parameter #1—an array of addresses
Name |
Type |
Presence |
Description |
|---|---|---|---|
Request |
object or string |
Required |
A JSON object with the addresses, or a single address as a string |
→ |
array |
Required |
An array of P2PKH or P2SH Dash address(es) |
→→ |
string (base58) |
Required |
The base58check encoded address |
Result—the current balance in duffs and the total number of duffs received (including change)
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
object |
Required |
An object listing the current balance and total amount received (including change), or an error if any address is invalid |
→ |
number (int) |
Required |
The current balance in duffs |
→ |
number (int) |
Required |
The current immature balance in duffs |
→ |
number (int) |
Required |
The current spendable balance in duffs |
→ |
number (int) |
Required |
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#
Note
Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.
Changed in version 24.0.0: The address index is now built in the background. While it is syncing, this RPC returns an Address index is syncing error. Use the getindexinfo RPC to check its progress.
The getaddressdeltas RPC returns all changes for an address.
Parameter #1—an array of addresses and an optional block height range
Name |
Type |
Presence |
Description |
|---|---|---|---|
Request |
object |
Required |
A JSON object with the addresses and an optional block height range |
→ |
array |
Required |
An array of P2PKH or P2SH Dash address(es) |
→→ |
string (base58) |
Required |
The base58check encoded address |
→ |
number (int) |
Optional |
The start block height. The range is only applied if |
→ |
number (int) |
Optional |
The end block height. Must not be lower than |
Result—information about all changes for the address(es)
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
array |
Required |
An array of JSON objects, with each object describing a transaction involving one of the requested addresses |
→ |
object |
Required |
An object describing a particular address delta |
→→ |
number |
Required |
The difference of duffs |
→→ |
string |
Required |
The related txid |
→→ |
number |
Required |
The related input or output index |
→→ |
number |
Required |
The position of the transaction within its block |
→→ |
number |
Required |
The block height |
→→ |
string |
Required |
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#
Note
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 |
|---|---|---|---|
Request |
object or string |
Required |
A JSON object with the addresses, or a single address as a string |
→ |
array |
Required |
An array of P2PKH or P2SH Dash address(es) |
→→ |
string (base58) |
Required |
The base58check encoded address |
Result—information about mempool deltas for the address(es)
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
array |
Required |
An array of JSON objects, with each object describing a transaction involving one of the requested addresses |
→Mempool Deltas |
object |
Required |
An object describing a particular mempool address delta |
→→ |
string |
Required |
The base58check encoded address |
→→ |
string |
Required |
The related txid |
→→ |
number |
Required |
The related input or output index |
→→ |
number |
Required |
The difference of duffs |
→→ |
number (int) |
Required |
The time the transaction entered the mempool (seconds) |
→→ |
string (hex) |
Optional |
The previous txid (if spending) |
→→ |
number (int) |
Optional |
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#
Note
Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.
Changed in version 24.0.0: The address index is now built in the background. While it is syncing, this RPC returns an Address index is syncing error. Use the getindexinfo RPC to check its progress.
The getaddresstxids RPC returns the txids for an address(es).
Parameter #1—an array of addresses and an optional block height range
Name |
Type |
Presence |
Description |
|---|---|---|---|
Request |
object or string |
Required |
A JSON object with the addresses and an optional block height range, or a single address as a string (no height range) |
→ |
array |
Required |
An array of P2PKH or P2SH Dash address(es) |
→→ |
string (base58) |
Required |
The base58check encoded address |
→ |
number (int) |
Optional |
The start block height. The range is only applied if |
→ |
number (int) |
Optional |
The end block height |
Result—information about txids for the address(es)
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
array |
Required |
An array of txids related to the requested address(es) |
→ |
string |
Required |
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#
Note
Requires -addressindex Dash Core command-line/configuration-file parameter to be enabled.
Changed in version 24.0.0: The address index is now built in the background. While it is syncing, this RPC returns an Address index is syncing error. Use the getindexinfo RPC to check its progress.
The getaddressutxos RPC returns all unspent outputs for an address.
Parameter #1—an array of addresses
Name |
Type |
Presence |
Description |
|---|---|---|---|
Request |
object or string |
Required |
A JSON object with the addresses, or a single address as a string |
→ |
array |
Required |
An array of P2PKH or P2SH Dash address(es) |
→→ |
string (base58) |
Required |
The base58check encoded address |
Result—information about unspent outputs for the address(es)
Name |
Type |
Presence |
Description |
|---|---|---|---|
|
array |
Required |
An array of JSON objects, with each object describing a transaction involving one of the requested addresses |
→Unspent outputs |
object |
Required |
An object describing a particular unspent output for the requested address(es) |
→→ |
string |
Required |
The base58check encoded address |
→→ |
string |
Required |
The output txid |
→→ |
number |
Required |
The output index |
→→ |
string |
Required |
The script hex encoded |
→→ |
number |
Required |
The number of duffs of the output |
→→ |
number |
Required |
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
}
]