> For the complete documentation index, see [llms.txt](https://docs.artinals.com/artinals-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.artinals.com/artinals-protocol/metrics-and-statistics-24h-volumes-twap-price-impact.md).

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