# Pool Information

This guide explains how to fetch pool data from the Dozer Pool Manager using the public Hathor Node API.

### Contract IDs

* **Mainnet**: `000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c`
* **Testnet**: `00000eecf6a990576c12bfa9e12ee089a5b1ea65e6de1456687ba1f4dc7fd463`

***

### 1. List All Pools

Get a list of all active pool keys in the contract.

**Method**: `get_all_pools()`\
**Returns**: List of strings (Pool Keys)\
**Pool Key Format**: `TOKEN_A_UID/TOKEN_B_UID/FEE_INT`

#### Example Request

```bash
curl -s -G "https://node1.mainnet.hathor.network/v1a/nano_contract/state" \
  --data-urlencode "id=000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c" \
  --data-urlencode "calls[]=get_all_pools()" \
  | jq
```

#### Response

```json
{
  "success": true,
  "calls": {
    "get_all_pools()": {
      "return": [
        "00000000.../00002b66.../50",
        "00000000.../0000abcd.../30"
      ]
    }
  }
}
```

***

### 2. Get Pool Details

Get detailed statistics and state for a specific pool.

**Method**: `front_end_api_pool(pool_key)`\
**Args**: `pool_key` (string) - The unique identifier from `get_all_pools()`

#### Example Request

Fetch details for a specific pool (replace `POOL_KEY` with actual key).

```bash
# Example Pool Key: HTR (00) / hUSDC (...) / 80 fee (0.8%)
POOL_KEY="00/00008035.../80"

curl -s -G "https://node1.mainnet.hathor.network/v1a/nano_contract/state" \
  --data-urlencode "id=000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c" \
  --data-urlencode "calls[]=front_end_api_pool(\"$POOL_KEY\")" \
  | jq
```

#### Response Structure

The response returns a `PoolApiInfo` object.

```json
{
  "return": [
    200000,   // reserve0 (Amount)
    500000,   // reserve1 (Amount)
    80,       // fee (Amount, basis points)
    10000,    // volume (Amount)
    50,       // fee0 (Accumulated Token 0 Fees)
    120,      // fee1 (Accumulated Token 1 Fees)
    1000,     // dzr_rewards (Amount)
    25,       // transactions (Count)
    1,        // is_signed (1 = true, 0 = false)
    "Habc..." // signer (Address hex or null)
  ]
}
```

**Note**: All Amounts are integers. You typically need to apply token decimals (usually 2 or 8) to get human-readable values.


---

# 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.dozer.finance/apis/pool-information.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.
