> ## Documentation Index
> Fetch the complete documentation index at: https://kb.talostrading.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Profitability

## Contents

* [UTXO Cnt in Loss](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/network-usage/profitability.md#utxolosscnt)
* [UTXO Cnt in Profit](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/network-usage/profitability.md#utxoprofcnt)

## UTXO Cnt in Loss

### Definition

The sum count of unspent transaction outputs created on days where the closing price was higher than the closing price at the end of the period.

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| UTXO Cnt in Loss | UTXOLossCnt | UTXO | 1 day |

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

[https://coverage.coinmetrics.io/asset-metrics/UTXOLossCnt](https://coverage.coinmetrics.io/asset-metrics/UTXOLossCnt)

## UTXO Cnt in Profit

### Definition

The sum count of unspent transaction outputs created on days where the closing price was lower than or equal to the closing price at the end of the period.

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| UTXO Cnt in Profit | UTXOProfCnt | UTXO | 1 day |

### Release History

* Release Version: NDP-EOD 4.8 (Nov, 2020)

### Availability for Assets

[https://coverage.coinmetrics.io/asset-metrics/UTXOProfCnt](https://coverage.coinmetrics.io/asset-metrics/UTXOProfCnt)

## API Endpoints

Profitability metrics can be accessed using these endpoints:

* `timeseries/asset-metrics`

and by passing in the metric ID's `UTXO*` in the `metrics` parameter.

`GET /timeseries/asset-metrics`

> [tab] Shell
>
> ```shell theme={null}
> curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=UTXOProfCnt&assets=btc&pretty=true&api_key=<your_key>"
> ```

> [tab] Python
>
> ```python theme={null}
> import requests
> response = requests.get('https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=UTXOProfCnt&assets=btc&pretty=true&api_key=<your_key>').json()
> print(response)
> ```

> [tab] Python Client
>
> ```python theme={null}
> from coinmetrics.api_client import CoinMetricsClient
>
> api_key = "<API_KEY>"
> client = CoinMetricsClient(api_key)
>
> print(
>     client.get_asset_metrics(
>         metrics="UTXOProfCnt", 
>         assets="btc",
>     ).to_dataframe()
> )
> ```
