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

> Retrieve global trading fee rates and fees over 7, 30, and 90 days.

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/fee-rate
  ```

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

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

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.exponent.finance/clmm/6CFxKYZkRUDBcJSHo3PBHJ7iBiCmEXePrCFT26mZx1id/historical/fee-rate");
  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="7d" type="object | null">
    Historical fee statistics over the 7d lookback.

    <Expandable title="child attributes">
      <ResponseField name="7d.feeRate" type="number | null">
        Historical fee rate for this lookback; null when the endpoint cannot calculate it.
      </ResponseField>

      <ResponseField name="7d.feesInBaseToken" type="number | null">
        Collected fees converted to raw base-token units for this lookback; null when unavailable.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="30d" type="object | null">
    Historical fee statistics over the 30d lookback.

    <Expandable title="child attributes">
      <ResponseField name="30d.feeRate" type="number | null">
        Historical fee rate for this lookback; null when the endpoint cannot calculate it.
      </ResponseField>

      <ResponseField name="30d.feesInBaseToken" type="number | null">
        Collected fees converted to raw base-token units for this lookback; null when unavailable.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="90d" type="object | null">
    Historical fee statistics over the 90d lookback.

    <Expandable title="child attributes">
      <ResponseField name="90d.feeRate" type="number | null">
        Historical fee rate for this lookback; null when the endpoint cannot calculate it.
      </ResponseField>

      <ResponseField name="90d.feesInBaseToken" type="number | null">
        Collected fees converted to raw base-token units for this lookback; null when unavailable.
      </ResponseField>
    </Expandable>
  </ResponseField>
</ApiResponse>

<ResponseExample>
  ```json 200 theme={null}
  {
    "7d": {
      "feeRate": 0.001693788188840689,
      "feesInBaseToken": 267357524.04940656
    },
    "30d": {
      "feeRate": null,
      "feesInBaseToken": null
    },
    "90d": {
      "feeRate": null,
      "feesInBaseToken": null
    }
  }
  ```

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


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