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

# Underlying APY and exchange rate history

> Returns historical underlying yield and exchange rates for an SY token.

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="sy_token_mint" type="string" required>
  SY token mint address.
</ParamField>

## Query parameters

<ParamField query="timeframeSeconds" type="integer" default="1209600">
  History window in seconds, ending at the current time. Defaults to 14 days.
</ParamField>

<ParamField query="epoch" type="boolean" default="false">
  Return epoch-transition observations with available APY values instead of sampled price history.
</ParamField>

<ParamField query="apyLookback" type="string" default="3_epochs">
  APY lookback when `epoch=true`: `1_epoch` or `3_epochs`. Other values use `3_epochs`.
</ParamField>

<RequestExample dropdown>
  ```bash cURL theme={null}
  curl 'https://api.exponent.finance/underlying-apy-chart/G1qbuP11CdquJCzuDjruWqatQAHroajmxhLfeQVgHosF?timeframeSeconds=86400'
  ```

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

  response = requests.get("https://api.exponent.finance/underlying-apy-chart/G1qbuP11CdquJCzuDjruWqatQAHroajmxhLfeQVgHosF?timeframeSeconds=86400", timeout=30)
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.exponent.finance/underlying-apy-chart/G1qbuP11CdquJCzuDjruWqatQAHroajmxhLfeQVgHosF?timeframeSeconds=86400");
  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ApiResponse errors={{"500": {"error": "Failed to fetch APY data", "details": "<message>"}}}>
  <ResponseField name="sy_token_mint" type="string">
    Requested SY token mint address.
  </ResponseField>

  <ResponseField name="data" type="object[]">
    Observations in chronological order. Returns an empty array when no matching history is available.

    <Expandable title="child attributes">
      <ResponseField name="timestamp" type="string">
        Observation timestamp in ISO 8601 format.
      </ResponseField>

      <ResponseField name="underlying_apy" type="number | null">
        Annual percentage yield as a decimal: `0.11` means 11%. Can be null when no APY lookback is available.
      </ResponseField>

      <ResponseField name="exchange_rate" type="number">
        SY exchange rate at the observation timestamp.
      </ResponseField>

      <ResponseField name="epoch" type="integer">
        Epoch number, when returned in epoch mode.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="epoch_filtered" type="boolean">
    Whether epoch-transition filtering was requested.
  </ResponseField>

  <ResponseField name="apy_lookback" type="string">
    Lookback used for APY: `1d`, `3d`, `7d`, `1_epoch`, or `3_epochs`. For non-epoch data, prefers 7 days, then 3 days, then 1 day; reports the most recent available lookback. Omitted when none is available.
  </ResponseField>
</ApiResponse>

<ResponseExample>
  ```json 200 theme={null}
  {
    "sy_token_mint": "G1qbuP11CdquJCzuDjruWqatQAHroajmxhLfeQVgHosF",
    "data": [
      {
        "timestamp": "2026-10-14T00:01:23+00:00",
        "underlying_apy": 0.11020250497612305,
        "exchange_rate": 1.155508115
      },
      {
        "timestamp": "2026-10-15T00:01:51+00:00",
        "underlying_apy": 0.11020907427677296,
        "exchange_rate": 1.155839113
      }
    ],
    "epoch_filtered": false,
    "apy_lookback": "7d"
  }
  ```

  ```json 500 theme={null}
  {
    "error": "Failed to fetch APY data",
    "details": "<message>"
  }
  ```
</ResponseExample>


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