GET Transaction Output by Reference
Before submitting an API request, ensure you have completed the following:
- Created an Account
- Created a Project
The Blockchain Indexer API allows applications to retrieve on-chain data and submit transactions.
In this example, we will use the Pre-Production Cardano network as the selected network for our project.
- Ensure your project is configured to use the Pre-Production Cardano network.
- Use the following endpoint to get detailed information about a transaction and its output UTxO:
- Include the required path parameters in your request:
Parameter | Data Type | Description | Required |
---|---|---|---|
tx_hash | String | The unique identifier of the transaction. | yes |
index | Integer | The output index is specifying which UTxO to retrieve. | yes |
- Include optional query parameters as needed:
Parameter | Data Type | Description | Required |
---|---|---|---|
with_cbor | Boolean | Set to true to include the CBOR encoding of the transaction output in the response. | no |
- Use cURL or your preferred tool to send the API request:
For this example, we will use:
- tx_hash: 9907c1bcab96889368d975ec1964e2fedfef22ce4a0e367bf9cb621b9f0dcb4a
- index: 0
- with_cbor: true
The API will return a response like the following:
Term | Definition |
---|
tx_hash | The unique hash identifier of a transaction. |
---|---|
index | The index position of the transaction output (UTxO). |
assets unit | The reference for native assets, either hex(policy_id)#hex(asset_name) or lovelace. |
assets quantity | The quantity of the native asset. |
address | The address controlling the UTxO. |
datum type | Type of datum: either inline or hash. |
datum hash | The hash of the datum. |
datum bytes | Hex-encoded CBOR bytes of the datum (null if datum type is hash and corresponding datum bytes have not been seen on-chain). |
datum json | JSON format of the datum value. |
reference_script type | The type of reference script: native, plutusv1, or plutusv2. |
reference_script hash | The hash of the reference script. |
reference_script bytes | The script bytes (null if the script is native). |
reference_script json | JSON format of the script. |