Marketplace has launched, further enabling blockchain developers! Learn more

Contents

platform.getUtxOs RPC method

The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. addresses - []string - the addresses from which we want to retrieve the UTXOs.
  2. limit - int - (optional) At most limit UTXOs are returned. If limit is omitted or greater than 1024, it is set to 1024.
  3. startIndex - object - (optional) an object of an address and a utxo.

    Address - string

    utxo - string

  4. sourceChain - string - (optional) the chain from which we want to fetch the UTXOs, (X or C).
  5. encoding - string - (optional) specifies the format for the returned UTXOs. Can be either "cb58" or "hex" and defaults to "cb58".

Returns:

  1. numFetched - string - the number of UTXOs fetched.
  2. utxos - []string - the UTXOs fetched.
  3. endIndex - object - the last address and utxo that was fetched.

    address - string

    utxo - string

  4. encoding - string - specifies the format for the returned UTXOs. Can be either "cb58" or "hex" and defaults to "cb58".

Code Examples:

curl --location --request POST http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/P \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"platform.getUTXOs",
    "params" :{
        "addresses":["P-avax1tnuesf6cqwnjw7fxjyk7lhch0vhf0v95wj5jvy"],
        "sourceChain": "X",
        "limit": 5,
        "encoding": "hex"
    }
}'
Ready to get started? Create a free account