Skip to main content

avm.getUtxOs RPC Method

Get the UTXOs that reference a given address.

Updated on
Nov 2, 2023

avm.getUtxOs RPC Method

Parameters

addresses
array of strings
REQUIRED
A list of UTXOs such that each UTXO references at least one address in the list of addresses.
limit
integer
The limit of UTXOs to return. If the limit is omitted or greater than 1024, it is set to 1024.
startIndex
object
If startIndex is omitted, it will fetch all UTXOs up to the limit. When using pagination (i.e when startIndex is provided), UTXOs are not guaranteed to be unique across multiple calls. A UTXO may appear in the result of the first call, and then again in the second call.
address
string
The address at the start index
utxo
string
The utxo at the start index
sourceChain
string
The ID or alias of the chain the asset is being imported from.
encoding
string
The format for the returned UTXOs. Can only be hex when a value is provided. Defaults to hex.

Returns

numFetched
Int
Number of UTXOs fetched.
utxos
array of strings
A list of UTXOs
endIndex
Object
Denotes the last UTXO returned. To get the next set of UTXOs, use the value of endIndex as startIndex in the next call.
address
string
The address at the start index
utxo
string
The UTXO at the start index
Request
1
curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro/ext/bc/C/rpc/ext/bc/X \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jsonrpc":"2.0",
5
"id" :1,
6
"method" :"avm.getUTXOs",
7
"params" :{
8
"addresses":["X-avax16902ur8dhlyxpaa0rva5fx48fhptx6ryh3dv7q"],
9
"limit": 5,
10
"sourceChain": "X",
11
"encoding": "hex"
12
}
13
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free