# Historical aggregations

These are designed for:

* Dashboards
* Quantitative research
* Risk & compliance workflows
* Backtesting trading strategies

### Historical aggregation examples

<details>

<summary>Realized &#x26; Unrealized PnL per wallet</summary>

* Entry and exit price
* Time of trade
* Fee inclusion
* Final position value

</details>

<details>

<summary>Top wallets by PnL</summary>

* Daily / weekly / monthly ranking
* Wallet age / trade count / total profit
* Profit % and ROI distribution

</details>

<details>

<summary>Max possible unrealized PnL</summary>

* Avg entry price vs token ATH
* Held token volume
* Time-windowed unrealized gain max

</details>

<details>

<summary>Wallet token usage</summary>

* % volume per token
* Tokens traded
* Number of interactions per token

</details>

<details>

<summary>Wallet activity overview</summary>

* Tx count (24h, 7d, 30d)
* Avg trade frequency
* SOL/USD volume
* Unique tokens traded

</details>

<details>

<summary>Token price dynamics</summary>

* Live + historical prices
* Delta over 1m, 5m, 1h, 24h
* Moving averages

</details>

<details>

<summary> Wallet volume &#x26; activity</summary>

* Buy/sell count and ratio
* Volume windows
* Unique counterparties (optional)

</details>

<details>

<summary>Token creator analytics</summary>

* Creator wallet balance over time
* Authority transfers
* Sniper detection (bought in same block)
* Early exits

</details>

<details>

<summary>Holder-level token stats</summary>

* % of holders at profit/loss
* Volume in profit/loss
* Time-since-buy segmentation

</details>

<details>

<summary>Smart wallet signals</summary>

* Tagging: ROI, consistency, size
* Smart wallet trades per token
* Overlap with user activity

</details>


---

# 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.lyslabs.ai/contextualized-data/historical-aggregations.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.
