get_outs - Monero

Example code for the get_outs JSON-RPC method. Complete guide on how to use get_outs JSON-RPC in GetBlock Web3 documentation.

This non-JSON-RPC endpoint returns transaction outputs by their global output index. Wallets use this to fetch decoys when constructing ring signatures.

Parameters

Parameter
Type
Required
Description

outputs

array

Yes

Array of {amount, index} pairs to look up

get_txid

boolean

No

If true, also return the originating transaction ID

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/get_outs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "outputs": [
        {
            "amount": 1000000000000,
            "index": 0
        }
    ],
    "get_txid": true
}'

Response Example

Response Parameters

Field
Type
Description

outs

array

Array of output records

outs[].key

string

Output public key

outs[].mask

string

Commitment mask for RingCT outputs

outs[].txid

string

Hash of the transaction that created the output (if get_txid=true)

outs[].height

unsigned int

Block height where the output was created

outs[].unlocked

boolean

true if the output is currently spendable

Use Cases

  • Wallet decoy selection for transaction construction

  • Output-tracking analytics

  • Chain audits and research on output unlock schedules

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?