# Type Alias AggregateMethod

AggregateMethod:
| "average"
| "min"
| "max"
| "first"
| "last"
| "mid"
| "middle_index"
| "sma"
| "ema"

Method for aggregating historical data points within a time bucket.

- `average`: Mean of all values in the bucket
- `min`: Minimum value
- `max`: Maximum value
- `first`: First value chronologically
- `last`: Last value chronologically
- `mid`: Midpoint between min and max: (min + max) / 2
- `middle_index`: Value at the middle index position
- `sma`: Simple Moving Average with number of samples specified in the parameter array (e.g., sma:5 for 5-sample SMA)
- `ema`: Exponential Moving Average with alpha specified in the parameter array (e.g., ema:0.2 for alpha=0.2 EMA)

- Defined in history.ts:17