# On-Chain Data: DEX Liquidity Pool Forensics

{% hint style="info" %}
See our [List of Read & Write Endpoints ](broken://pages/ZfuiowQRgplR3FDAjcxw)for a complete list of endpoints that can be used to perform liquidity pool forensics
{% endhint %}

Analyzing liquidity pools across a range of DeFi protocols is a difficult endeavor for researchers and other crypto market participants. Sourcing accurate data from which you can draw actionable insights presents several challenges. The sheer quantity of data alone is a challenge, since analyzing liquidity pools requires high quality historical and real-time pool transaction data. In addition, several key data points can be especially tricky - for example, calculating an individual token’s composition of a pool and sourcing an accurate count of liquidity providers in a pool. These challenges are compounded when one tries to monitor multiple pools.&#x20;

At expand.network, we have created a series of endpoints to solve this challenging issue and make monitoring liquidity pool composition and on-going transactions accessible for users. Some examples of uses for this data include blockchain analytics firms looking to analyze pools and monitor movements and researchers looking to understand pool dynamics and assess risk.

## expand.network’s Liquidity Forensics Endpoints

* **Address Analysis:** The“[<mark style="color:blue;">getpoolindividualliquidity</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#getpoolindividualliquidity)” returns  all user addresses, block numbers, and token position details for a specified pool address. This can be used to accurately identify the public addresses associated with liquidity contributions.
* **Pool Liquidity:** The “[<mark style="color:blue;">getpoolliquidity</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#getpoolliquidity)” endpoint returns the total liquidity for a specified pool.&#x20;
* **Token Liquidity:** The “[<mark style="color:blue;">gettokenliquidity</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#gettokenliquidity)” endpoint allows users to source the individual token liquidity within a specified liquidity pool.
* **Holder Enumeration:** The“[<mark style="color:blue;">getliquidityholders</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#getliquidityholders)” endpoint returns the total number of liquidity providers in a specified liquidity pool, allowing users to easily source a key metric for assessing the health of a liquidity pool.
* **Management Across Pools:** For those looking to understand address dynamics across multiple pools,  the “[<mark style="color:blue;">getindividualposition</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#getindividualposition)” endpoint will return the liquidity position for a specified user address across all the pools of a specified DEX.&#x20;
* **User Liquidity:** The “[<mark style="color:blue;">getuserliquidity</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#getuserliquidity)” endpoint returns the balance of a specified token pair for a specified address.&#x20;
* **Aggregated DEX Quotes:** The “[<mark style="color:blue;">quoteaggregator</mark>](/integrations/dex-and-dex-aggregators.md#quoteaggregator)” endpoint returns quotes for a specific pair address from various DEXs and DEX aggregators in which the pair address is present.
* **Token Pair Swap Quote:** The “[<mark style="color:blue;">getprice</mark>](/integrations/dex-and-dex-aggregators/uniswap-v2.md#getprice)” endpoint returns the swap quotation for a specified token pair for a specified DEX.&#x20;

<figure><img src="/files/KdDhssZC0gGTLuwxgx1j" alt=""><figcaption><p>Sample LP Forensic Dashboard</p></figcaption></figure>

## Applications

1. **Automated Pool Management:** In conjunction with the expand.network API's transacting capabilities, you can source data to reliably automate pool management operations.
2. **Real-time Insights:** Users can monitor real-time pool dynamics to support risk management and trading decisions.&#x20;
3. **Historical Analysis:** Source extensive historical data to analyze liquidity trends and pool dynamics, and refine liquidity provisioning strategies.
4. **Portfolio Management:** Track liquidity pool positions across multiple pools and at various periods of time to accurately value portfolios.&#x20;
5. **Custom Reporting and Notifications:** Users can create customized reports on pool performance and receive notifications for important events, such as significant liquidity changes.


---

# 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.expand.network/use-cases/on-chain-data-dex-liquidity-pool-forensics.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.
