Quick Start
Make Your First API Request
Query Cardano UTxOs
16min
get utxo details on cardano in this guide, you will learn to query cardano and extract utxo information by leveraging the utxos at an address https //docs gomaestro org/cardano/utxos at an address endpoint prerequisites before submitting an api request, ensure you have completed the following getting started docid 3wmdf cqc0f3qrklets3f getting started docid 3wmdf cqc0f3qrklets3f project name \<your project name> blockchain cardano network preprod steps to submit an api request the api allows applications to retrieve detailed information on utxos controlled by a specific address in this example, we will use the cardano preprod as the selected network for our project 1\ select the network ensure your project is configured to use cardano preprod 2\ retrieve transaction output use the following endpoint to get a list of all utxos that reside at the specified cardano address or script pubkey /addresses/\ address/utxos 3\ specify path parameters include the required path parameters in your request parameter data type description required address string the address in bech32 format to query utxos yes 4\ specify query parameters (optional) include optional query parameters as needed parameter data type description required asset string returns only utxos containing a specific asset (formatted as concatenation of hex encoded policy and asset name) no resolve datums boolean if true , include corresponding datums for datum hashes in the response no with cbor boolean if true , includes cbor encodings of transaction outputs in the response no count integer maximum number of results to return per page no order string sort order for results ( asc for ascending or desc for descending) no from int64 returns only utxos created on or after a specific slot number no to int64 returns only utxos created on or before a specific slot number no cursor string pagination cursor string to fetch the next page of results 5\ send the api request use curl or your preferred tool to send the api request for this example, we will use address addr test1wzdtu0djc76qyqak9cj239udezj2544nyk3ksmfqvaksv7c9xanpg order asc curl l x get \\ h "accept application/json" \\ h "api key \<api key value>" \\ 'https //preprod gomaestro api org/v1/addresses/addr test1wzdtu0djc76qyqak9cj239udezj2544nyk3ksmfqvaksv7c9xanpg/utxos?order=asc' 6\ review the response the api will return a response like the following { "data" \[ { "tx hash" "6c1bbfff3b22f189b325fee3f51eceacf13090aae895e912c56ec615efacb3e0", "index" 0, "slot" 57115432, "assets" \[ { "unit" "lovelace", "amount" 1224040 }, { "unit" "0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2446a65644f7261636c654e4654", "amount" 1 } ], "address" "addr test1wzdtu0djc76qyqak9cj239udezj2544nyk3ksmfqvaksv7c9xanpg", "datum" { "type" "hash", "hash" "065191b95752a6ecca365cfd19a68f8968215596fbfc94f1fbc8ab0053d9110f", "bytes" null, "json" null }, "reference script" null, "txout cbor" null } ], "last updated" { "timestamp" "2024 09 11 23 22 19", "block hash" "053a9d8a812db204a32ddbb90834128ec8f94a3de2c990caa413dd55ae30d5c1", "block slot" 70413739 }, "next cursor" null } 7\ understanding the response term definition tx hash the unique identifier of the transaction that created this utxo index the output index of this utxo within the transaction slot the slot number at which this utxo was created assets a list of assets contained in this utxo, including their unit (type) and amount address the address associated with this utxo datum type the type of datum associated with this utxo (e g , "hash") datum hash the hash of the datum associated with this utxo datum bytes the byte representation of the datum (if available), otherwise null datum json the json representation of the datum (if available), otherwise null reference script a reference to a script associated with this utxo, if any, otherwise null txout cbor the cbor encoding of the transaction output, if available, otherwise null last updated timestamp the timestamp indicating when the data was last updated last updated block hash the hash of the block where the utxo data was last updated last updated block slot the slot number of the block where the utxo data was last updated next cursor a pointer to the next set of data if there are more results; otherwise null next steps congrats! now that you've made your api request, let's submit your first transaction docid\ albtfznix7oe2xmfiobfk