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

# Tranche APY by coverage and utilization

> Estimate tranche APYs across coverage and utilization levels.

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="minCoveragePct" type="number">
  Minimum coverage percentage. Defaults to the market minimum; values at or near zero are floored to `0.01`.
</ParamField>

<ParamField query="maxCoveragePct" type="number">
  Maximum coverage percentage, at most `100`. Default: `100`.
</ParamField>

<ParamField query="points" type="number">
  Requested sample count, rounded down; from `2` to `200`. Default: `61`.
</ParamField>

<RequestExample dropdown>
  ```bash cURL theme={null}
  curl https://api.exponent.finance/tranching-markets/HM8iLNE2WEN6J1AuwSSCoM37wgeLQFwYZ4ymYLqAoapN/utilization-apy-chart
  ```

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

  response = requests.get("https://api.exponent.finance/tranching-markets/HM8iLNE2WEN6J1AuwSSCoM37wgeLQFwYZ4ymYLqAoapN/utilization-apy-chart", timeout=30)
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.exponent.finance/tranching-markets/HM8iLNE2WEN6J1AuwSSCoM37wgeLQFwYZ4ymYLqAoapN/utilization-apy-chart");
  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="address" type="string">
    Tranching market account address.
  </ResponseField>

  <ResponseField name="current_coverage_ratio" type="number | null">
    Coverage fraction at the current market state.
  </ResponseField>

  <ResponseField name="current_utilization_pct" type="number | null">
    Utilization value at the current market state.
  </ResponseField>

  <ResponseField name="data" type="object[]">
    Modeled senior and junior APYs at each coverage and utilization point.

    <Expandable title="child attributes">
      <ResponseField name="data[].coverage_ratio" type="number | null">
        Junior effective NAV divided by protected exposure: senior raw NAV plus beta-weighted junior raw NAV.
      </ResponseField>

      <ResponseField name="data[].junior_apy" type="number | null">
        Junior-tranche APY as a decimal; null when unavailable.
      </ResponseField>

      <ResponseField name="data[].senior_apy" type="number | null">
        Senior-tranche APY as a decimal; null when unavailable.
      </ResponseField>

      <ResponseField name="data[].utilization_pct" type="number">
        Utilization value at this observation or curve point.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="min_coverage_ratio" type="number | null">
    Minimum permitted junior coverage fraction.
  </ResponseField>

  <ResponseField name="target_coverage_ratio" type="number | null">
    Coverage fraction at the return model’s target utilization.
  </ResponseField>

  <ResponseField name="target_utilization_pct" type="number">
    Return model’s target utilization value.
  </ResponseField>

  <ResponseField name="underlying_apy" type="number | null">
    Underlying asset APY as a decimal.
  </ResponseField>
</ApiResponse>

<ResponseExample>
  ```json 200 theme={null}
  {
    "address": "HM8iLNE2WEN6J1AuwSSCoM37wgeLQFwYZ4ymYLqAoapN",
    "current_coverage_ratio": 0.3272375462515827,
    "current_utilization_pct": 61.117681113,
    "data": [
      {
        "coverage_ratio": 1,
        "junior_apy": null,
        "senior_apy": null,
        "utilization_pct": 20
      },
      {
        "coverage_ratio": 0.999000000000999,
        "junior_apy": 0.11022579358546518,
        "senior_apy": 0.08278059589414243,
        "utilization_pct": 20.02002002
      }
    ],
    "min_coverage_ratio": 0.2,
    "target_coverage_ratio": 0.2222222222222222,
    "target_utilization_pct": 90,
    "underlying_apy": 0.11020250497612305
  }
  ```

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