> ## 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

> Retrieve current and historical average 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>

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

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

  response = requests.get("https://api.exponent.finance/clmm/6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id/historical/liquidity-apy", 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");
  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ApiResponse errors={{"500": {"error": "<message>"}}}>
  <ResponseField name="marketAddress" type="string">
    CLMM market whose data was requested.
  </ResponseField>

  <ResponseField name="currentApy" type="number | null">
    Total LP APY from the most recent daily snapshot, as a decimal.
  </ResponseField>

  <ResponseField name="apy7d" type="number | null">
    Mean daily-snapshot LP APY over seven days, or null when coverage is insufficient.
  </ResponseField>

  <ResponseField name="apy30d" type="number | null">
    Mean daily-snapshot LP APY over 30 days, or null when coverage is insufficient.
  </ResponseField>

  <ResponseField name="apy90d" type="number | null">
    Mean daily-snapshot LP APY over 90 days, or null when coverage is insufficient.
  </ResponseField>
</ApiResponse>

<ResponseExample>
  ```json 200 theme={null}
  {
    "marketAddress": "6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id",
    "currentApy": 0.0959594620331801,
    "apy7d": 3299.969360684741,
    "apy30d": null,
    "apy90d": null
  }
  ```

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


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