API - Pools Metrics Endpoint
Description
This endpoint provides information about all active assets in the protocol or a specific asset by its SY address. For each asset, it returns data about the PT token price in USD, pool liquidity, fixed annual percentage rate (APR), and addresses of all related tokens.
When requesting a specific asset by SY address, the endpoint will return the asset even if it's matured (expired). For matured assets, the values of pt_price_usd
, pool_liquidity_usd
, and fixed_apr
will be set to 0.
URL
GET https://api2.thefiva.com/protocol_metrics
Request Parameters
sy_address
(optional): SY token address. If specified, only the asset with this address will be returned (active or matured).
Example Requests
Get all assets:
Get a specific asset by SY address:
Example Response
Response Fields Explanation
The response contains the following key information:
assets
: Array of asset objects with details about each available assetsy_address
: The address of the SY (Standardized Yield) tokenservice
: The service provider for the asset (e.g., "evaa")maturity_date
: ISO-formatted date when the fixed-rate position will maturept_price_usd
: Current price of PT tokens in USDpool_liquidity_usd
: Total liquidity in the pool in USDfixed_apr
: Current fixed APR (annual percentage rate) offered for this assetjettons
: Object containing address information for all related tokens:underlying_jetton
: The base asset (e.g., USDT)sy
: The Standardized Yield tokenpt
: Principal Token (represents the fixed-rate position)yt
: Yield Tokenlp
: Liquidity Provider token
count
: Total number of assets returnedcurrent_utc
: Current UTC timestamp when the request was processed
Response Codes
200 OK
: Request successfully processed404 Not Found
: Asset with the specified SY address not found500 Internal Server Error
: Server error
Usage in Integration
For integration purposes, this API endpoint is especially useful for:
Retrieving current fixed APRs across all available assets
Getting information about pool liquidity to show available capacity
Obtaining all token addresses needed for integration
Calculating time remaining until maturity for active fixed-rate positions
Implementation Example
Here's an example of how to fetch data from the API in JavaScript:
Notes
For matured assets, the values of
pt_price_usd
,pool_liquidity_usd
, andfixed_apr
will be 0The API should be called periodically to get updated APR and liquidity information
Always handle API errors gracefully in your implementation
Last updated