Skip to main content

Endpoints

Get APY​

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

Endpoint:

GET /api/:product/:network/apy

Path Parameters:

ParameterTypeRequiredDescription
productstringYesThe Overlayer product: usdc or usdt
networkstringYesMust match the server: eth-sepolia (testnet) or eth-mainnet (mainnet)

Example Requests:

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

{
"apy": "12.45",
"product": "usdc"
}
FieldTypeDescription
apystringThe current APY as a percentage value
productstringThe requested product identifier

Error Responses:

Invalid Product:

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

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

{
"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.

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

Server Error:

{
"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:

ParameterTypeRequiredDescription
productstringYesThe Overlayer product: usdc or usdt
networkstringYesMust match the server: eth-sepolia (testnet) or eth-mainnet (mainnet)

Query Parameters:

ParameterTypeRequiredDescription
fromDatestringYesStart date in ISO 8601 format (e.g., 2025-01-01)
toDatestringYesEnd 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:

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

{
"totalRewards": 1234.56,
"elementsCount": 32,
"fromDate": "2025-01-01",
"toDate": "2025-02-01",
"product": "usdc"
}
FieldTypeDescription
totalRewardsnumberSum of staking rewards recorded in the date range
elementsCountnumberNumber of data points in the date range
fromDatestringThe requested start date
toDatestringThe requested end date
productstringThe requested product identifier

Error Responses:

Missing or Invalid Date:

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

Invalid Date Range:

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

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

{
"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:

ParameterTypeRequiredDescription
productstringYesThe Overlayer product: usdc or usdt
networkstringYesMust match the server: eth-sepolia (testnet) or eth-mainnet (mainnet)

Query Parameters:

ParameterTypeRequiredDescription
fromDatestringYesStart date in ISO 8601 format (e.g., 2025-01-01)
toDatestringYesEnd 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:

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

{
"meanStakedAmount": 50000.25,
"fromDate": "2025-01-01",
"toDate": "2025-02-01",
"product": "usdc"
}
FieldTypeDescription
meanStakedAmountnumberAverage staked amount over the date range
fromDatestringEcho of the requested start date query parameter
toDatestringEcho of the requested end date query parameter
productstringThe requested product identifier

Error Responses:

Missing or Invalid Date:

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

Invalid Date Range:

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

No Data Found:

{
"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.