# 📊 Usage and Cost

Usage is measured in **Compute Units (CU)**.\
Each **user action** parsed and returned by the API is counted as **1 CU**.

* **What is a user action?**\
  A decoded on-chain activity such as:
  * `swap`
  * `add_liquidity`
  * `supply`
  * `borrow`
  * `stake`
  * …

### API/Websocket Usage & Cost

API/Websocket usage is measured in **Compute Units (CU)**.

* **1 user action = 1 CU**
* For API called, if transaction/block has 0 decoded user action, **1 CU is deducted**

**Examples:**

* A decoded transaction with **3 user actions = 3 CUs**
* A decoded block with **150 user actions = 150 CUs**
* Receiving an event message via Websocket including **100 actions = 100 CUs**

###

**Examples:**

* Block with 150 actions (last 30 days) = **150 CU**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://txdecoder.gitbook.io/docs/pricing-and-payments/usage-and-cost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
