# Get UTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/utxo/{descriptor}

Returns the unspent transaction outputs for a Litecoin address, xpub, or output descriptor. Includes confirmed and unconfirmed UTXOs by default; pass `confirmed=true` to limit to confirmed only. UTXOs are sorted newest-first.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-utxo

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| descriptor | string | Yes | Litecoin address, xpub, or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| confirmed | boolean | No | When `true`, exclude unconfirmed UTXOs. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2
```

### JavaScript

```javascript
const options = {method: 'GET'};

fetch('https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2"

response = requests.get(url)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /{apiKey}/api/v2/utxo/{descriptor}
method: GET
operation:
  operationId: getUtxo
  summary: Get UTXOs
  description: |
    Returns the unspent transaction outputs for a Litecoin address, xpub, or output descriptor. Includes confirmed and unconfirmed UTXOs by default; pass `confirmed=true` to limit to confirmed only. UTXOs are sorted newest-first.
  tags:
    - UTXO API Endpoints
  parameters:
    - name: apiKey
      in: path
      required: true
      schema:
        type: string
        default: docs-demo
      description: For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup)
    - in: path
      name: descriptor
      required: true
      description: Litecoin address, xpub, or output descriptor.
      schema:
        type: string
      example: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2
    - in: query
      name: confirmed
      required: false
      description: When `true`, exclude unconfirmed UTXOs.
      schema:
        type: boolean
        default: false
  responses:
    '200':
      description: List of UTXOs.
      content:
        application/json:
          schema:
            type: array
            items:
              type: object
              required:
                - txid
                - vout
                - value
              properties:
                txid:
                  type: string
                vout:
                  type: integer
                value:
                  type: string
                  description: Value in the smallest denomination, as a decimal string.
                height:
                  type: integer
                  description: Block height. Omitted for unconfirmed UTXOs.
                confirmations:
                  type: integer
                lockTime:
                  type: integer
                  description: Lock time, only set for unconfirmed UTXOs with non-zero locktime.
                coinbase:
                  type: boolean
                  description: True if the output comes from a coinbase transaction within the first 100 confirmations.
                address:
                  type: string
                path:
                  type: string
                  description: Derivation path. Only set when querying by xpub or descriptor.
          example:
            - txid: d9a5e3a3cb19be98a2ed6a205a22d207892e1c0ba8faf0301abcd94d5f545545
              vout: 1
              value: '2718006'
              height: 2981901
              confirmations: 125929
            - txid: c5826af541034211d27483996160f6c5467adc9de7fd6045afe3b0957ac7ddb7
              vout: 0
              value: '10000'
              height: 2876920
              confirmations: 230910
    '400':
      description: Malformed request.
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
                description: Human-readable error message.
          example:
            error: invalid request
    '404':
      description: Resource not found on the requested network.
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
                description: Human-readable error message.
          example:
            error: not found
```
