# Metrics and Statistics (24h Volumes, TWAP, Price Impact)

Functions like `record_trade(...)`, `get_trades_24h(...)`, and `calculate_average_price_24h(...)` help track:

* **24h Volumes**: Total trading volumes over the last day, aiding analytics and decision-making.
* **TWAP**: Providing stable pricing references.
* **Price Impact**: Calculating how much a trade shifts the price and ensuring trades occur within acceptable bounds.

**Use Cases**:

* Analytics dashboards displaying recent pool activity and health.
* Traders adjusting strategy based on recent volume and volatility.

**Best Practices**:

* Regularly read and interpret these metrics to maintain a healthy, attractive pool.
* Set safeguards (e.g., max slippage) based on observed volatility.


---

# 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://docs.artinals.com/artinals-protocol/metrics-and-statistics-24h-volumes-twap-price-impact.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.
