> ## 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.

# Contracts

## Contents

* [Contracts Executed Count](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/transactions/contracts.md#txcontcallcnt)
* [Contracts Executed Successfully Count](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/transactions/contracts.md#txcontcallsucccnt)
* [Transactions Invoking Contract Count](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/transactions/contracts.md#txcontcnt)
* [New Created Contracts Count](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/transactions/contracts.md#txcontcreatcnt)
* [Destroyed Contracts Count](https://kb.talostrading.com/coinmetrics/network-data/network-data-overview/transactions/contracts.md#txcontdestcnt)

## Contracts Executed Count

### Definition

The sum count of contract calls executed across all transactions in that interval. A contract call is the invocation of a contract’s code by another contract or non-contract address. Failed invocations are counted. A single transaction can result in multiple contract calls.

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| Contracts Executed Count | TxContCallCnt | Calls | 1 day |

### Details

* Failed transactions are included.
* Contract creations and destructions are not included.

### Asset-Specific Details

* This metric is only available for SOL, ETH, ETC, and XTZ.

### Release History

* Version 4.2 of CM Network Data Pro Daily Macro (End of Day)

### Availability for Assets

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

## Contracts Executed Successfully Count

### Definition

The sum count of contract calls successfully executed across all transactions in that interval. A contract call is the invocation of a contract’s code by another contract or non-contract address. Only successful executions are taken into account.

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| Contracts Executed Successfully Cnt | TxContCallSuccCnt | Calls | 1 day |

### Details

* Contract creations and destructions are not included.

### Asset-Specific Details

* For Solana, count of all instruction calls from successful transactions, excluding vote instructions

### Release History

* Version 4.2 of CM Network Data Pro Daily Macro (End of Day)

### Availability for Assets

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

## Transactions Invoking Contract Count

### Definition

The sum count of transactions that invoked a contract in that interval. Failed transactions are counted but internal transactions are not (i.e., only the parent transaction is counted). A contract is a special address that contains and can execute code.

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| Transaction Invoking Contract Count | TxContCnt | Transactions | 1 day |

### Details

* Failed transactions are counted.
* Contract creations are counted.
* Internal transactions are not counted (i.e., only the parent transaction is counted).

### Asset-Specific Details

* This metric is only available for ETH, ETC, and XTZ.

### Release History

* Version 4.2 of CM Network Data Pro Daily Macro (End of Day)

### Availability for Assets

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

## New Created Contracts Count

### Definition

The sum count of new contracts successfully created across all transactions in that interval. A contract is a special address that contains and can execute code.

### Dictionary

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| New Created Contracts Count | TxContCreatCnt | Contracts | 1 day |

### Details

* If a transaction creates multiple contracts, each creation is counted once.

### Asset-Specific Details

* This metric is only available for ETH and ETC.

### Release History

* Version 4.2 of CM Network Data Pro Daily Macro (End of Day)

### Availability for Assets

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

## Destroyed Contracts Count

### Defintion

The sum count of contracts successfully destroyed across all transactions in that interval. A contract is a special address that contains and can execute code.

| Name | MetricID | Unit | Interval |
| - | - | - | - |
| Destroyed Contracts Count | TxContDestCnt | Contracts | 1 day |

### Details

* If a transaction destroys several contracts, each destruction is counted once.
* Not all contract protocols allow contract destruction.

### Asset-Specific Details

* This metric is only available for ETH and ETC.

### Release History

* Version 4.2 of CM Network Data Pro Daily Macro (End of Day)

### Availability for Assets

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

## API Endpoints

Contract Transaction metrics can be accessed using these endpoints:

* `timeseries/asset-metrics`

and by passing in the metric ID's `TxContCallCnt` , `TxContDestCnt` etc. in the `metrics` parameter.

`GET /timeseries/asset-metrics`

> [tab] Shell
>
> ```shell theme={null}
> curl --compressed "https://api.coinmetrics.io/v4/timeseries/asset-metrics?metrics=TxContCallCnt&assets=eth&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=TxContCallCnt&assets=eth&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="TxContCallCnt", 
>         assets="eth",
>     ).to_dataframe()
> )
> ```
