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

# CLMM deposits, withdrawals, and fees

> Retrieve deposit and withdrawal events with collected fee totals.

export const ApiResponse = ({children, errors = {}}) => {
  const [status, setStatus] = useState("200");
  const statuses = ["200", ...Object.keys(errors)];
  return <section className="api-response" aria-label="Response">
      <div className="api-response-header not-prose">
        <h2>Response</h2>
        <div className="api-response-format">
          {statuses.length > 1 ? <select aria-label="Response status" value={status} onChange={event => setStatus(event.target.value)}>
              {statuses.map(code => <option key={code} value={code}>{code}</option>)}
            </select> : <span>200</span>}
          <span className="api-response-mime">application/json</span>
        </div>
      </div>
      <div hidden={status !== "200"}>{children}</div>
      {status !== "200" && <div aria-live="polite">
          {Object.entries(errors[status]).map(([name, value]) => <ResponseField key={name} name={name} type={value === null ? "null" : Array.isArray(value) ? "array" : typeof value}>
              {name === "error" ? "Error message describing why the request failed." : "Additional error details."}
            </ResponseField>)}
        </div>}
    </section>;
};

## Query parameters

<ParamField query="userAddress" type="string" required>
  User wallet.
</ParamField>

<ParamField query="markets" type="string" required>
  Comma-separated market addresses or a JSON-encoded string array.
</ParamField>

<ParamField query="startTime" type="string">
  ISO 8601 lower bound.
</ParamField>

<ParamField query="endTime" type="string">
  ISO 8601 upper bound.
</ParamField>

<RequestExample dropdown>
  ```bash cURL theme={null}
  curl 'https://api.exponent.finance/clmm/liquidity-history?userAddress=HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4&markets=6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get("https://api.exponent.finance/clmm/liquidity-history?userAddress=HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4&markets=6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id", timeout=30)
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.exponent.finance/clmm/liquidity-history?userAddress=HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4&markets=6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id");
  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ApiResponse errors={{"400": {"error": "<message>"}, "500": {"error": "<message>"}}}>
  <ResponseField name="userAddress" type="string">
    Wallet whose liquidity events were requested.
  </ResponseField>

  <ResponseField name="markets" type="string[]">
    Deduplicated CLMM market addresses included in the request.
  </ResponseField>

  <ResponseField name="startTime" type="string | null">
    Inclusive ISO 8601 lower time bound, or null when omitted.
  </ResponseField>

  <ResponseField name="endTime" type="string | null">
    Inclusive ISO 8601 upper time bound, or null when omitted.
  </ResponseField>

  <ResponseField name="deposits" type="object[]">
    Indexed liquidity-deposit events.

    <Expandable title="child attributes">
      <ResponseField name="id" type="number">
        Indexed liquidity-event ID.
      </ResponseField>

      <ResponseField name="signature" type="string">
        Solana transaction signature for the event.
      </ResponseField>

      <ResponseField name="market_address" type="string">
        CLMM market in which liquidity changed.
      </ResponseField>

      <ResponseField name="created_at" type="string">
        Indexed event timestamp in ISO 8601 format.
      </ResponseField>

      <ResponseField name="lp_position" type="string">
        LP position affected by the event.
      </ResponseField>

      <ResponseField name="delta_liquidity" type="number">
        Raw liquidity units added or removed by this event.
      </ResponseField>

      <ResponseField name="lp_balance_after" type="number">
        Raw position liquidity remaining after the event.
      </ResponseField>

      <ResponseField name="depositor_address" type="string">
        Wallet depositing liquidity.
      </ResponseField>

      <ResponseField name="amount_pt_in" type="number">
        PT contributed in raw token units.
      </ResponseField>

      <ResponseField name="amount_sy_in" type="number">
        SY contributed in raw token units.
      </ResponseField>

      <ResponseField name="lower_tick" type="number">
        Lower tick of the position’s liquidity range.
      </ResponseField>

      <ResponseField name="upper_tick" type="number">
        Upper tick of the position’s liquidity range.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="withdrawals" type="object[]">
    Indexed liquidity-withdrawal events.

    <Expandable title="child attributes">
      <ResponseField name="id" type="number">
        Indexed liquidity-event ID.
      </ResponseField>

      <ResponseField name="signature" type="string">
        Solana transaction signature for the event.
      </ResponseField>

      <ResponseField name="market_address" type="string">
        CLMM market in which liquidity changed.
      </ResponseField>

      <ResponseField name="created_at" type="string">
        Indexed event timestamp in ISO 8601 format.
      </ResponseField>

      <ResponseField name="lp_position" type="string">
        LP position affected by the event.
      </ResponseField>

      <ResponseField name="liquidity_to_remove" type="number">
        Raw liquidity units removed by this withdrawal.
      </ResponseField>

      <ResponseField name="lp_balance_after" type="number">
        Raw position liquidity remaining after the event.
      </ResponseField>

      <ResponseField name="withdrawer_address" type="string">
        Wallet withdrawing liquidity.
      </ResponseField>

      <ResponseField name="amount_pt_out" type="number">
        PT returned by the withdrawal, in raw PT units.
      </ResponseField>

      <ResponseField name="amount_sy_out" type="number">
        SY returned by the withdrawal, in raw SY units.
      </ResponseField>

      <ResponseField name="fee_pt_collected" type="number">
        PT fees collected during withdrawal, in raw token units.
      </ResponseField>

      <ResponseField name="fee_sy_collected" type="number">
        SY fees collected during withdrawal, in raw token units.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="feeTotals" type="object">
    Collected fees aggregated by market address.

    <Expandable title="child attributes">
      <ResponseField name="[marketAddress]" type="object">
        Totals for one requested market.

        <Expandable title="child attributes">
          <ResponseField name="ptFees" type="number">
            Sum of collected PT fees in raw PT units.
          </ResponseField>

          <ResponseField name="syFees" type="number">
            Sum of collected SY fees in raw SY units.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>
</ApiResponse>

<ResponseExample>
  ```json 200 theme={null}
  {
    "userAddress": "HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4",
    "markets": [
      "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id"
    ],
    "startTime": null,
    "endTime": null,
    "deposits": [
      {
        "id": 11186,
        "signature": "5copwpYpAg3xCydY9hkwKVCEEsTQWGb8y6td4v5Wh6SiuRzJBRgWLwtG8Z1G3rgehNNFhA5Smd2vjSTHpC1vo9Aa",
        "depositor_address": "HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4",
        "market_address": "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id",
        "token_pt_src": "tLfbi7e69LuHdPtrCWTbYnQNFJQpVAcGyzaEGP828p5",
        "token_sy_src": "GwCiTPE6SYpFp8RM5vN15WV7SpfcSMVdScDyE8EGgrRF",
        "amount_pt_in": 55179,
        "amount_sy_in": 52466,
        "delta_liquidity": 2330044,
        "lower_tick": 90000,
        "upper_tick": 140000,
        "created_at": "2026-10-13T15:50:38+00:00",
        "lp_position": "9CxhgcwkK7HFTZP93aPJNbHVW5cK1nwdGKt5s3Ge8SPo",
        "lp_balance_after": 2330044,
        "tokens_owed_sy": 0,
        "tokens_owed_pt": 0,
        "farms": [
          {
            "staged": "0",
            "lastSeenIndex": "0"
          },
          {
            "staged": "0",
            "lastSeenIndex": "0"
          }
        ],
        "share_trackers": [
          {
            "lpShare": "10764",
            "tickIdx": 3,
            "emissions": [
              {
                "staged": "0",
                "lastSeenIndex": "0"
              },
              {
                "staged": "0",
                "lastSeenIndex": "0"
              }
            ],
            "splitEpoch": "0",
            "rightTickIdx": 2
          },
          {
            "lpShare": "10022",
            "tickIdx": 2,
            "emissions": [
              {
                "staged": "0",
                "lastSeenIndex": "0"
              },
              {
                "staged": "0",
                "lastSeenIndex": "0"
              }
            ],
            "splitEpoch": "1",
            "rightTickIdx": 8
          }
        ],
        "fee_inside_last_pt": "0",
        "fee_inside_last_sy": "0"
      },
      {
        "id": 11173,
        "signature": "4Bough5BQ3LEcd61kWznf2veKbTHKE2gvro37qkhcy2uhg1atTABErQMYKUj3SwdYULafWiJ4zVwtkRB9tZgHQPS",
        "depositor_address": "HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4",
        "market_address": "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id",
        "token_pt_src": "tLfbi7e69LuHdPtrCWTbYnQNFJQpVAcGyzaEGP828p5",
        "token_sy_src": "GwCiTPE6SYpFp8RM5vN15WV7SpfcSMVdScDyE8EGgrRF",
        "amount_pt_in": 25455754,
        "amount_sy_in": 7241225,
        "delta_liquidity": 3388389625,
        "lower_tick": 105000,
        "upper_tick": 115000,
        "created_at": "2026-10-13T14:49:14+00:00",
        "lp_position": "7dgfQy9MUdJV4R3JLLnh3Msp8WGZAds95AU9kZwR4mmW",
        "lp_balance_after": 3388389625,
        "tokens_owed_sy": 0,
        "tokens_owed_pt": 0,
        "farms": [
          {
            "staged": "0",
            "lastSeenIndex": "0"
          },
          {
            "staged": "0",
            "lastSeenIndex": "0"
          }
        ],
        "share_trackers": [
          {
            "lpShare": "29148628",
            "tickIdx": 8,
            "emissions": [
              {
                "staged": "0",
                "lastSeenIndex": "0"
              },
              {
                "staged": "0",
                "lastSeenIndex": "0"
              }
            ],
            "splitEpoch": "1",
            "rightTickIdx": 9
          }
        ],
        "fee_inside_last_pt": "0",
        "fee_inside_last_sy": "0"
      }
    ],
    "withdrawals": [
      {
        "id": 12141,
        "signature": "3ZbDneq93bQijuP2EdshJZKg91r9yNtreYxk2bRX4kiz3Ene8msrquVEMMBWqxpiFELXYKUWJwcjjWgTMZe3ehs7",
        "withdrawer_address": "HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4",
        "market_address": "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id",
        "token_pt_withdrawer": "tLfbi7e69LuHdPtrCWTbYnQNFJQpVAcGyzaEGP828p5",
        "token_sy_withdrawer": "GwCiTPE6SYpFp8RM5vN15WV7SpfcSMVdScDyE8EGgrRF",
        "liquidity_to_remove": 1747533,
        "amount_pt_out": 41381,
        "amount_sy_out": 39346,
        "new_lp_supply": 903689460346,
        "lower_tick": 90000,
        "upper_tick": 140000,
        "created_at": "2026-10-13T15:51:31+00:00",
        "lp_position": "9CxhgcwkK7HFTZP93aPJNbHVW5cK1nwdGKt5s3Ge8SPo",
        "lp_balance_after": 582511,
        "tokens_owed_sy": 0,
        "tokens_owed_pt": 0,
        "fee_sy_collected": 0,
        "fee_pt_collected": 0,
        "farms": [],
        "share_trackers": [],
        "fee_inside_last_pt": "0",
        "fee_inside_last_sy": "0"
      },
      {
        "id": 12140,
        "signature": "uLKvTc573D9xgDhFcesCkKsiKAgSD81yv2tUwQJtvGZEVH3GFt9mvTWm3DkuYbMJsTuXCBDBTvLgiFBUQT4oByF",
        "withdrawer_address": "HRt73vbP87cUmzJJAH5tWyCuwyN9Syws2RxqND9pTMs4",
        "market_address": "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id",
        "token_pt_withdrawer": "tLfbi7e69LuHdPtrCWTbYnQNFJQpVAcGyzaEGP828p5",
        "token_sy_withdrawer": "GwCiTPE6SYpFp8RM5vN15WV7SpfcSMVdScDyE8EGgrRF",
        "liquidity_to_remove": 67767792,
        "amount_pt_out": 588285,
        "amount_sy_out": 76786,
        "new_lp_supply": 903691207879,
        "lower_tick": 105000,
        "upper_tick": 115000,
        "created_at": "2026-10-13T15:51:06+00:00",
        "lp_position": "7dgfQy9MUdJV4R3JLLnh3Msp8WGZAds95AU9kZwR4mmW",
        "lp_balance_after": 3320621833,
        "tokens_owed_sy": 0,
        "tokens_owed_pt": 0,
        "fee_sy_collected": 68,
        "fee_pt_collected": 95,
        "farms": [],
        "share_trackers": [],
        "fee_inside_last_pt": "0",
        "fee_inside_last_sy": "0"
      }
    ],
    "feeTotals": {
      "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id": {
        "ptFees": 1953,
        "syFees": 133
      }
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "<message>"
  }
  ```

  ```json 500 theme={null}
  {
    "error": "<message>"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.