---
title: "Volume, value, commissions & timing — Trading Analytics | Roundly"
description: "Traded size and notional value, commission totals, how often trades are opened and how long positions stay open."
url: https://roundly-consulting.com/open-source/docs/trading-analytics-for-laravel/activity-metrics
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Trading Analytics for Laravel](https://roundly-consulting.com/open-source/docs/trading-analytics-for-laravel.md)

# Volume, value, commissions & timing

Four aggregate metrics describe trading activity. Each has a total, count, average, highest and lowest — with the responsible pair — at every breakdown level:

- volume — the traded size, over every trade.
- value — the notional value at entry: size × open price, over every trade.
- commission — the commission per trade; a trade without one counts as 0, so the average is per trade and the lowest can be 0.
- duration — how long closed trades stayed open, in seconds (2 decimals), averaged over the closed trades.

```php
$analytics->volume->global->total->total;            // '3.50' — total size traded
$analytics->volume->forPair('BTC/USD')->buy->total;   // '0.50'
$analytics->value->global->total->average;           // '9700.00' — size x open price
$analytics->value->global->total->highest;           // '20000.00'
$analytics->value->global->total->highestPair;       // 'BTC/USD'
$analytics->commission->global->total->total;        // '19.00'
$analytics->commission->forQuoteCurrency('USD')->sell->average;
$analytics->duration->global->total->average;        // '38400.00' — seconds
$analytics->duration->global->total->highest;        // '86400.00' — the longest hold
```

## Trading frequency

frequency measures how often trades are opened: the average gap between opens — the span from the earliest to the latest open time, divided by the opens minus one — expressed as trades per hour, day, week, month or year, whichever unit fits the gap. It needs neither sorted input nor any per-trade history. The unit is stored as the value’s suffix. Fewer than two trades, or trades that all opened in the same second, leave it at 0 with no unit, and there is no buy/sell split:

```php
(string) $analytics->frequency->total;       // '4.7 per week'
$analytics->frequency->total->toRawString(); // '4.7'
$analytics->frequency->total->suffix;        // 'per week'
$analytics->frequency->forPair('ETH/USD');
$analytics->frequency->forBaseCurrency('ETH');
```

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/trading-analytics-for-laravel.md)
