> ## 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 LP yield history

> Retrieve the historical components of CLMM liquidity APY.

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>;
};

## Path parameters

<ParamField path="address" type="string" required>
  Solana account address.
</ParamField>

## Query parameters

<ParamField query="startTime" type="number">
  Unix seconds. Default: 24 hours before now.
</ParamField>

<ParamField query="endTime" type="number">
  Unix seconds. Default: now.
</ParamField>

<RequestExample dropdown>
  ```bash cURL theme={null}
  curl https://api.exponent.finance/clmm/6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id/historical/liquidity-apy/chart-data
  ```

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

  response = requests.get("https://api.exponent.finance/clmm/6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id/historical/liquidity-apy/chart-data", timeout=30)
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.exponent.finance/clmm/6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id/historical/liquidity-apy/chart-data");
  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="marketAddress" type="string">
    CLMM market whose data was requested.
  </ResponseField>

  <ResponseField name="data" type="object[]">
    Daily LP-yield observations split into PT, SY, fees, and farm-reward contributions.

    <Expandable title="child attributes">
      <ResponseField name="data[].timestampUnix" type="number">
        Observation time in Unix seconds.
      </ResponseField>

      <ResponseField name="data[].ptApyWeighted" type="number">
        PT-yield contribution weighted by the pool’s PT allocation.
      </ResponseField>

      <ResponseField name="data[].syApyWeighted" type="number">
        Underlying-yield contribution weighted by the pool’s SY allocation.
      </ResponseField>

      <ResponseField name="data[].tradingFeeApy" type="number">
        Annualized yield from trading fees as a decimal.
      </ResponseField>

      <ResponseField name="data[].farmRewardsApy" type="number">
        Annualized yield from farm emissions as a decimal.
      </ResponseField>

      <ResponseField name="data[].totalApy" type="number">
        Combined APY. See the calculation notes on this page.
      </ResponseField>
    </Expandable>
  </ResponseField>
</ApiResponse>

<ResponseExample>
  ```json 200 theme={null}
  {
    "marketAddress": "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id",
    "data": [
      {
        "timestampUnix": 1791912002,
        "ptApyWeighted": 0.07304241591535097,
        "syApyWeighted": 0.029619458166677937,
        "tradingFeeApy": 0.00013849691610690051,
        "farmRewardsApy": 1.2801107787688633,
        "totalApy": 0.10280037099813581
      },
      {
        "timestampUnix": 1791922803,
        "ptApyWeighted": 0.0659623547893718,
        "syApyWeighted": 0.033329689693163723,
        "tradingFeeApy": 0.0001886713186933786,
        "farmRewardsApy": 1.0581888013199099,
        "totalApy": 0.09948071580122891
      }
    ]
  }
  ```

  ```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.