# APY

Retrieve historical trailing APY for an xToken based on share value changes.

### Endpoint

```
GET /sdk/tokenized/:symbol/apy
```

### Parameters

#### Path Parameters

| Parameter | Type   | Required | Description                       |
| --------- | ------ | -------- | --------------------------------- |
| `symbol`  | string | Yes      | The xToken symbol (e.g., "xHYPE") |

#### Query Parameters

| Parameter | Type   | Default | Description             |
| --------- | ------ | ------- | ----------------------- |
| `range`   | string | "30d"   | Date range for the data |

**Valid Range Values**

| Value  | Description        |
| ------ | ------------------ |
| `7d`   | Last 7 days        |
| `30d`  | Last 30 days       |
| `90d`  | Last 90 days       |
| `180d` | Last 180 days      |
| `max`  | All available data |

### Response

```json
[
  {
    "timestamp": 1764028799999,
    "trailing3d": 0.510996879274972,
    "trailing7d": 0.510996879274972,
    "trailing30d": 0.510996879274972
  },
  {
    "timestamp": 1764115199999,
    "trailing3d": 13.431426694025916,
    "trailing7d": 13.431426694025916,
    "trailing30d": 13.431426694025916
  },
  {
    "timestamp": 1764201599999,
    "trailing3d": 9.549996005731476,
    "trailing7d": 9.549996005731476,
    "trailing30d": 9.549996005731476
  }
]
```

### Response Fields

| Field         | Type   | Description                                   |
| ------------- | ------ | --------------------------------------------- |
| `timestamp`   | number | End of day UTC (23:59:59.999) in milliseconds |
| `trailing3d`  | number | Average of daily APYs over the last 3 days    |
| `trailing7d`  | number | Average of daily APYs over the last 7 days    |
| `trailing30d` | number | Average of daily APYs over the last 30 days   |

All APY values are in **percentage format** (e.g., 15.67 = 15.67% APY).

### Important Notes

* Timestamps represent the **end of day UTC** (23:59:59.999)
* If insufficient data exists for a trailing period, available data is used
* If the requested range exceeds available data, all available data is returned

### Errors

| Code | Description                                   |
| ---- | --------------------------------------------- |
| 400  | Missing `symbol` parameter or invalid `range` |
| 404  | xToken not found or no TVL data available     |
| 500  | Internal server error                         |

### Example Requests

#### Default Request (30 days)

```bash
curl "https://api.liminal.money/sdk/tokenized/xHYPE/apy"
```

#### Last 7 Days

```bash
curl "https://api.liminal.money/sdk/tokenized/xHYPE/apy?range=7d"
```

#### Last 90 Days

```bash
curl "https://api.liminal.money/sdk/tokenized/xHYPE/apy?range=90d"
```

#### All Available Data

```bash
curl "https://api.liminal.money/sdk/tokenized/xHYPE/apy?range=max"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.liminal.money/tokenized/developers/sdk/apy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
