Fetch Utxos
API-v2fetch_utxos
Returns all unspent transaction outputs (UTXOs) for supported coins.
After a wallet has cultivated a long history, or received many small mining payouts, it may become slower to respond. Consolidating unspent transaction outputs should be routinely performed when mining to wallet in order to avoid this.
| Parameter* = required | Type | Description |
|---|---|---|
| coin* | string | The coin to fetch utxos for. |
| Parameter* = required | Type | Description |
|---|---|---|
| result* | string | The outcome of the request. |
fetch_utxos
POST
fetch_utxos{
"method": "fetch_utxos",
"mmrpc": "2.0",
"params": {
"coin": "MARTY"
},
"userpass": "RPC_UserP@SSW0RD"
}
Response (Success)
SUCCESS
{
"id": null,
"mmrpc": "2.0",
"result": {
"addresses": [
{
"address": "RDux85r5XE7xuUs5DCTt7jTY1cJZT7SKAW",
"count": 1,
"utxos": [
{
"txid": "15734e22b9e3f3eae1be74ec8971de0e19245770b0e78cb5490494d7f17d16c9",
"value": "7.62",
"vout": 0
}
]
}
],
"total_count": 1
}
}
| Parameter* = required | Type | Description |
|---|---|---|
| InvalidRequest | string | Optional. The request is malformed or missing required parameters. |
| NoSuchCoin | string | Optional. The selected coin was not found or is not activated yet. |
{
"mmrpc": "2.0",
"error": "NoSuchCoin",
"error_path": "fetch_utxos.lp_coins",
"error_trace": "fetch_utxos:72] lp_coins:5278]",
"error_type": "NoSuchCoin",
"id": null
}
{
"mmrpc": "2.0",
"error": "Error parsing request: missing field `coin`",
"error_path": "dispatcher",
"error_trace": "dispatcher:143]",
"error_type": "InvalidRequest",
"error_data": "missing field `coin`",
"id": null
}