---
title: "Endpoints"
description: "Overlayer REST API endpoint reference: current APY, staking rewards over a period and mean staked amount, with parameters and example requests."
keywords:
  - "API"
  - "endpoints"
  - "APY"
  - "staking rewards"
canonical_url: https://docs.overlayer.fi/developer_guide/api_documentation/endpoints
md_url: https://docs.overlayer.fi/developer_guide/api_documentation/endpoints.md
last_updated: 2026-05-05T15:42:56.000Z
---

# Endpoints

> Overlayer REST API endpoint reference: current APY, staking rewards over a period and mean staked amount, with parameters and example requests.

## Get APY

Retrieve the current Annual Percentage Yield (APY) for a specific Overlayer product.

**Endpoint:**

```
GET /api/:product/:network/apy
```

**Path Parameters:**

| Parameter | Type   | Required | Description                                      |
|-----------|--------|----------|--------------------------------------------------|
| `product` | string | Yes      | The Overlayer product: `usdc` or `usdt`          |
| `network` | string | Yes      | Must match the server: `eth-sepolia` (testnet) or `eth-mainnet` (mainnet) |

**Example Requests:**

```bash
# Get APY for USDC
curl https://api.overlayer.fi/api/usdc/eth-sepolia/apy

# Get APY for USDT
curl https://api.overlayer.fi/api/usdt/eth-sepolia/apy
```

**Success Response:**

```json
{
  "apy": "12.45",
  "product": "usdc"
}
```

| Field     | Type   | Description                           |
|-----------|--------|---------------------------------------|
| `apy`     | string | The current APY as a percentage value |
| `product` | string | The requested product identifier      |

**Error Responses:**

*Invalid Product:*

```json
{
  "error": "Invalid product",
  "valid_products": ["usdc", "usdt"]
}
```

*Invalid Network (path does not match this server’s chain):*

```json
{
  "error": "Invalid network",
  "valid_network": "eth-sepolia"
}
```

(`valid_network` is `eth-mainnet` when the API is running against Ethereum mainnet.)

*Wrong product for this server (400):* In multi-server setups, each instance only serves one product. The same pattern applies to every `/api/:product/:network/...` route below.

```json
{
  "error": "This server is configured for USDC, but you requested USDT",
  "server_product": "usdc"
}
```

*Server Error:*

```json
{
  "error": "An error occurred while fetching data"
}
```

---

## Get Staking Rewards

Retrieve the total sum of staking rewards for a specific date range.

**Endpoint:**

```
GET /api/:product/:network/staking-rewards
```

**Path Parameters:**

| Parameter | Type   | Required | Description                                      |
|-----------|--------|----------|--------------------------------------------------|
| `product` | string | Yes      | The Overlayer product: `usdc` or `usdt`          |
| `network` | string | Yes      | Must match the server: `eth-sepolia` (testnet) or `eth-mainnet` (mainnet) |

**Query Parameters:**

| Parameter  | Type   | Required | Description                                                        |
|------------|--------|----------|--------------------------------------------------------------------|
| `fromDate` | string | Yes      | Start date in ISO 8601 format (e.g., `2025-01-01`)                 |
| `toDate`   | string | Yes      | End date in ISO 8601 format (e.g., `2025-02-01`)                   |

> ⚠️ **Important:** To include a full calendar day at the end of your range, set `toDate` to the **next day** (exclusive end). For example, for January 1 through January 31, use `fromDate=2025-01-01` and `toDate=2025-02-01`.

**Example Request:**

```bash
# Get staking rewards for USDC for the entire month of January 2025
curl "https://api.overlayer.fi/api/usdc/eth-sepolia/staking-rewards?fromDate=2025-01-01&toDate=2025-02-01"
```

**Success Response:**

The response echoes your `fromDate` and `toDate` query values as strings (same as sent in the URL).

```json
{
  "totalRewards": 1234.56,
  "elementsCount": 32,
  "fromDate": "2025-01-01",
  "toDate": "2025-02-01",
  "product": "usdc"
}
```

| Field           | Type   | Description                                    |
|-----------------|--------|------------------------------------------------|
| `totalRewards`  | number | Sum of staking rewards recorded in the date range |
| `elementsCount` | number | Number of data points in the date range        |
| `fromDate`     | string | The requested start date                       |
| `toDate`       | string | The requested end date                         |
| `product`      | string | The requested product identifier               |

**Error Responses:**

*Missing or Invalid Date:*

```json
{
  "error": "fromDate is required"
}
```

```json
{
  "error": "toDate is not a valid date format. Use ISO 8601 format (e.g., 2025-01-15)"
}
```

*Invalid Date Range:*

```json
{
  "error": "fromDate must be before or equal to toDate"
}
```

*No data in range (404):* Typical response shape:

```json
{
  "error": "No data found for the specified date range",
  "product": "usdc"
}
```

The `error` text may vary slightly; `product` echoes your request when present.

---

## Get Mean Staked Amount

Returns the **average staked amount** for the product over the dates you request (same numeric style as other staking metrics for that product). Use it to summarize how much was staked on average during a period.

**Endpoint:**

```
GET /api/:product/:network/staked-mean
```

**Path Parameters:**

| Parameter | Type   | Required | Description                                      |
|-----------|--------|----------|--------------------------------------------------|
| `product` | string | Yes      | The Overlayer product: `usdc` or `usdt`          |
| `network` | string | Yes      | Must match the server: `eth-sepolia` (testnet) or `eth-mainnet` (mainnet) |

**Query Parameters:**

| Parameter  | Type   | Required | Description                                                        |
|------------|--------|----------|--------------------------------------------------------------------|
| `fromDate` | string | Yes      | Start date in ISO 8601 format (e.g., `2025-01-01`)                 |
| `toDate`   | string | Yes      | End date in ISO 8601 format (e.g., `2025-02-01`)                   |

> ⚠️ **Important:** To include a full calendar day at the end of your range, set `toDate` to the **next day** (exclusive end). For example, for January 1 through January 31, use `fromDate=2025-01-01` and `toDate=2025-02-01`.

**Example Request:**

```bash
# Get mean staked amount for USDC for the entire month of January 2025
curl "https://api.overlayer.fi/api/usdc/eth-sepolia/staked-mean?fromDate=2025-01-01&toDate=2025-02-01"
```

**Success Response:**

`fromDate` and `toDate` in the body match the query parameters you sent.

```json
{
  "meanStakedAmount": 50000.25,
  "fromDate": "2025-01-01",
  "toDate": "2025-02-01",
  "product": "usdc"
}
```

| Field              | Type   | Description                                      |
|--------------------|--------|--------------------------------------------------|
| `meanStakedAmount` | number | Average staked amount over the date range        |
| `fromDate`         | string | Echo of the requested start date query parameter |
| `toDate`           | string | Echo of the requested end date query parameter   |
| `product`          | string | The requested product identifier                 |

**Error Responses:**

*Missing or Invalid Date:*

```json
{
  "error": "fromDate is required"
}
```

```json
{
  "error": "toDate is not a valid date format. Use ISO 8601 format (e.g., 2025-01-15)"
}
```

*Invalid Date Range:*

```json
{
  "error": "fromDate must be before or equal to toDate"
}
```

*No Data Found:*

```json
{
  "error": "No data found for the specified date range",
  "product": "usdc"
}
```

---

## Rate Limiting

- **Limit:** 100 requests per 15 minutes per IP address
- Exceeding this limit will result in a `429 Too Many Requests` response

---

## Network

Use the `network` path segment that matches the deployment: **`eth-sepolia`** (testnet) or **`eth-mainnet`** (mainnet). The hosted pre-release environment may be Sepolia-only; production configuration follows the chain the operators attach to that instance.

---

## Support

For questions or issues, please reach out to the Overlayer team.
