> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hadron.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Pool Fees

> Fees a pool captured over a time window — pool-captured spread and protocol fee, with the protocol fee broken down per fee-split recipient.

Aggregates the fees a pool earned over the selected window into two parts:

* **Pool-captured spread** — the spread the pool's curve earned (price curve, risk curve, base spread), excluding the protocol fee.
* **Protocol fee** — the protocol fee captured, broken down per recipient for pools that route fees through the fee-split sidecar.

Computed on-the-fly over the window's swaps. For very high-volume windows the response sets `truncated: true` (see the field below).

## Path Parameters

<ParamField path="address" type="string" required>
  The pool config PDA address.
</ParamField>

## Query Parameters

<ParamField query="interval" type="string" default="24h">
  Lookback window ending now. One of `1h`, `24h`, `7d`, `30d`, or `all`
  (`all` aggregates the pool's full history).
</ParamField>

<ParamField query="cluster" type="string" default="mainnet-beta">
  Solana cluster — `mainnet-beta` or `devnet`.
</ParamField>

## Response

<ResponseField name="interval" type="string">
  The interval that was applied (echoes the request).
</ResponseField>

<ResponseField name="start_time" type="integer">
  Start of the window (Unix seconds). `0` when `interval=all`.
</ResponseField>

<ResponseField name="end_time" type="integer">
  End of the window (Unix seconds) — the request time.
</ResponseField>

<ResponseField name="mint_x" type="string | null">
  Pool's token X (base) mint.
</ResponseField>

<ResponseField name="mint_y" type="string | null">
  Pool's token Y (quote) mint.
</ResponseField>

<ResponseField name="totals" type="object">
  Aggregate fee totals over the window.

  <Expandable title="Totals">
    <ResponseField name="volume_usd" type="number">
      Total swap volume over the window, quote-denominated.
    </ResponseField>

    <ResponseField name="spread_usd" type="number">
      Pool-captured spread over the window (price/risk curve + base spread), quote-denominated. Excludes the protocol fee.
    </ResponseField>

    <ResponseField name="protocol_fee_usd" type="number">
      Total protocol fee captured over the window, quote-denominated.
    </ResponseField>

    <ResponseField name="protocol_fee_x_raw" type="number">
      Protocol fee collected in raw token-X atoms (from sells).
    </ResponseField>

    <ResponseField name="protocol_fee_y_raw" type="number">
      Protocol fee collected in raw token-Y atoms (from buys).
    </ResponseField>

    <ResponseField name="swap_count" type="integer">
      Number of swaps in the window.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="protocol_fee_split" type="array">
  Per-recipient split of the protocol fee over the window. Empty (`[]`) for pools that use the default (single) fee recipient, for windows with no fee-bearing split swaps, or for windows entirely before per-swap split tracking began.

  The sum of recipients' `fee_usd` equals `totals.protocol_fee_usd` only when **every** fee-bearing swap in the window carried a split; it is less when the window also includes default-fee swaps or pre-tracking swaps.

  <Expandable title="Recipient">
    <ResponseField name="recipient" type="string">
      Recipient wallet address.
    </ResponseField>

    <ResponseField name="ppm" type="integer">
      Most recently observed split weight (parts-per-million) for this recipient in the window.
    </ResponseField>

    <ResponseField name="fee_usd" type="number">
      Recipient's share of the protocol fee over the window, quote-denominated.
    </ResponseField>

    <ResponseField name="fee_x_raw" type="number">
      Recipient's share in raw token-X atoms (from sells).
    </ResponseField>

    <ResponseField name="fee_y_raw" type="number">
      Recipient's share in raw token-Y atoms (from buys).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="truncated" type="boolean">
  `true` if the per-query swap cap was reached, meaning the window contains more swaps than were aggregated. Narrow the `interval` for a complete result.
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "interval": "7d",
    "start_time": 1772634648,
    "end_time": 1773239448,
    "mint_x": "So11111111111111111111111111111111111111112",
    "mint_y": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "totals": {
      "volume_usd": 184320.45,
      "spread_usd": 122.84,
      "protocol_fee_usd": 36.91,
      "protocol_fee_x_raw": 41230000,
      "protocol_fee_y_raw": 33110000,
      "swap_count": 612
    },
    "protocol_fee_split": [
      {
        "recipient": "Rec1",
        "ppm": 700000,
        "fee_usd": 25.84,
        "fee_x_raw": 28861000,
        "fee_y_raw": 23177000
      },
      {
        "recipient": "Rec2",
        "ppm": 300000,
        "fee_usd": 11.07,
        "fee_x_raw": 12369000,
        "fee_y_raw": 9933000
      }
    ],
    "truncated": false
  }
  ```
</ResponseExample>
