From 8377eded1be9b6b391c47b45f6b125c531682ee5 Mon Sep 17 00:00:00 2001 From: slasher125 Date: Mon, 10 Aug 2026 11:22:28 +0200 Subject: [PATCH] add yields-v2 --- defillama-openapi-pro.json | 3301 ++++++++++++++++++++++++++++++++++++ 1 file changed, 3301 insertions(+) diff --git a/defillama-openapi-pro.json b/defillama-openapi-pro.json index 993f7347960..96da414ed92 100644 --- a/defillama-openapi-pro.json +++ b/defillama-openapi-pro.json @@ -64,6 +64,10 @@ "name": "yields", "description": "Data from our yields/APY dashboard" }, + { + "name": "yields v2", + "description": "V2 yields API: earn pools, borrow markets, borrow routes and leveraged loop strategies with APY attributed into base / reward / intrinsic components over current, 7-day and 30-day windows" + }, { "name": "ETFs", "description": "Tradfi ETFs" @@ -9710,6 +9714,3303 @@ ] } }, + "/yields/v2/earn": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve the latest data for all earn pools", + "description": "Returns every tracked earn pool (supply-side yield), sorted by TVL descending. APY values are percentages, attributed into `base` (organic), `reward` (incentive emissions) and `total` (base + reward) over `current`, `avg_7d` and `avg_30d` windows. Pools whose underlying token is itself yield-bearing additionally report that yield under `intrinsic`; it is not included in the pool APY. For a filtered, paginated variant of the same rows use `/yields/v2/earn/query`.", + "responses": { + "200": { + "description": "Array of all earn pools", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Pool id (UUID). Same id space as the v1 yields API pool field.", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_key": { + "type": "string", + "description": "Stable pool key.", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84-ethereum" + }, + "pool_token": { + "type": [ + "object", + "null" + ], + "description": "Receipt / vault token representing the position; null when the pool has no transferable pool token", + "properties": { + "address": { + "type": "string", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + }, + "name": { + "type": [ + "string", + "null" + ], + "example": "Liquid staked Ether 2.0" + } + } + }, + "display": { + "type": "object", + "description": "Display strings for listings", + "properties": { + "label": { + "type": [ + "string", + "null" + ], + "example": "stETH" + }, + "detail": { + "type": [ + "string", + "null" + ], + "example": "Liquid staked Ether 2.0" + } + } + }, + "reference_asset_symbol": { + "type": [ + "string", + "null" + ], + "description": "The asset you provide to enter the pool (e.g. ETH, USDC, BTC)", + "example": "ETH" + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "Pool page on the protocol app", + "example": "https://lido.fi/#networks" + }, + "protocol": { + "type": "string", + "description": "Protocol display name", + "example": "Lido" + }, + "chain": { + "type": "string", + "description": "Chain display name", + "example": "Ethereum" + }, + "underlying_tokens": { + "type": "array", + "description": "Tokens deposited into the pool", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0x0000000000000000000000000000000000000000" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "ETH" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + }, + "reward_tokens": { + "type": "array", + "description": "Incentive tokens currently emitted to the pool; empty when there are none", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0xd533a949740bb3306d119cc777fa900ba034cd52" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "CRV" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + }, + "tvl_usd": { + "type": [ + "number", + "null" + ], + "description": "Total value locked in USD", + "example": 18050422129 + }, + "apy": { + "type": "object", + "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.206 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.206 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.18932 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.18932 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.22409 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.22409 + } + } + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Yield accruing inside a yield-bearing underlying token, e.g. the stETH staking yield inside a wstETH pool. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + }, + "stability_30d": { + "type": "object", + "description": "Stability score (0 to 1) of the trailing 30-day APY series, computed as 1 / (1 + coefficient of variation); higher is steadier. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + }, + "base_reward": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + }, + "base_intrinsic": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + }, + "base_reward_intrinsic": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + } + } + }, + "price_per_share": { + "type": [ + "number", + "null" + ], + "description": "Pool token price per share for vault-style pools; null otherwise", + "example": null + }, + "volume_1d_usd": { + "type": [ + "number", + "null" + ], + "description": "Trailing 24h trading volume in USD for DEX pools; null otherwise", + "example": null + }, + "attributes": { + "type": "object", + "description": "Boolean attributes, also available as filters on /yields/v2/earn/query", + "properties": { + "stablecoin_only": { + "type": "boolean", + "description": "All pool assets are stablecoins", + "example": false + }, + "single_asset_exposure": { + "type": "boolean", + "description": "Position is exposed to a single asset", + "example": true + }, + "impermanent_loss_risk": { + "type": "boolean", + "description": "Position can suffer impermanent loss", + "example": false + } + } + }, + "holders": { + "type": "object", + "description": "Pool token holder statistics; values are null where holder data is not tracked", + "properties": { + "count": { + "type": [ + "number", + "null" + ], + "description": "Number of pool token holders", + "example": 618311 + }, + "avg_position_usd": { + "type": [ + "number", + "null" + ], + "description": "Average position size in USD", + "example": 29423.56 + }, + "top_10_share_pct": { + "type": [ + "number", + "null" + ], + "description": "Share of supply held by the top 10 holders, in percent", + "example": 61.97 + } + } + }, + "available_supply_usd": { + "type": [ + "number", + "null" + ], + "description": "Remaining deposit capacity in USD for lending pools with a supply cap (cap minus TVL, floored at 0); null when the pool has no cap", + "example": null + } + } + } + } + } + } + } + } + } + } + } + }, + "/yields/v2/earn/query": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve a filtered, paginated page of earn pools", + "description": "Same rows as `/yields/v2/earn`, filtered and paginated server-side while keeping the TVL-descending order. All filters combine with AND; `chain` and `protocol` may be repeated to match any of up to 20 values. Unknown query parameters and out-of-range values are rejected with `400 INVALID_QUERY_PARAM`. Without parameters the top 100 pools by TVL are returned.", + "parameters": [ + { + "name": "chain", + "in": "query", + "required": false, + "description": "Chain slug (lowercase). Repeat the parameter to match any of several chains, e.g. chain=ethereum&chain=arbitrum (at most 20 values)", + "schema": { + "type": "string", + "example": "ethereum" + } + }, + { + "name": "protocol", + "in": "query", + "required": false, + "description": "Protocol slug (lowercase, e.g. aave-v3). Repeat the parameter to match any of several protocols (at most 20 values)", + "schema": { + "type": "string", + "example": "lido" + } + }, + { + "name": "stablecoin", + "in": "query", + "required": false, + "description": "true keeps only pools whose assets are all stablecoins, false only the rest", + "schema": { + "type": "boolean", + "example": true + } + }, + { + "name": "single_asset_exposure", + "in": "query", + "required": false, + "description": "true keeps only pools exposed to a single asset, false only the rest", + "schema": { + "type": "boolean", + "example": true + } + }, + { + "name": "impermanent_loss_risk", + "in": "query", + "required": false, + "description": "true keeps only pools with impermanent loss risk, false only the rest", + "schema": { + "type": "boolean", + "example": false + } + }, + { + "name": "min_tvl", + "in": "query", + "required": false, + "description": "Minimum pool TVL in USD (inclusive)", + "schema": { + "type": "number", + "example": 1000000 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "1-based page number; default 1", + "schema": { + "type": "integer", + "minimum": 1, + "example": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Page size between 1 and 300; default 100. Values above 300 are rejected, not clamped", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 300, + "example": 100 + } + } + ], + "responses": { + "200": { + "description": "Page of earn pools matching the filters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Pool id (UUID). Same id space as the v1 yields API pool field.", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_key": { + "type": "string", + "description": "Stable pool key.", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84-ethereum" + }, + "pool_token": { + "type": [ + "object", + "null" + ], + "description": "Receipt / vault token representing the position; null when the pool has no transferable pool token", + "properties": { + "address": { + "type": "string", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + }, + "name": { + "type": [ + "string", + "null" + ], + "example": "Liquid staked Ether 2.0" + } + } + }, + "display": { + "type": "object", + "description": "Display strings for listings", + "properties": { + "label": { + "type": [ + "string", + "null" + ], + "example": "stETH" + }, + "detail": { + "type": [ + "string", + "null" + ], + "example": "Liquid staked Ether 2.0" + } + } + }, + "reference_asset_symbol": { + "type": [ + "string", + "null" + ], + "description": "The asset you provide to enter the pool (e.g. ETH, USDC, BTC)", + "example": "ETH" + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "Pool page on the protocol app", + "example": "https://lido.fi/#networks" + }, + "protocol": { + "type": "string", + "description": "Protocol display name", + "example": "Lido" + }, + "chain": { + "type": "string", + "description": "Chain display name", + "example": "Ethereum" + }, + "underlying_tokens": { + "type": "array", + "description": "Tokens deposited into the pool", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0x0000000000000000000000000000000000000000" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "ETH" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + }, + "reward_tokens": { + "type": "array", + "description": "Incentive tokens currently emitted to the pool; empty when there are none", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0xd533a949740bb3306d119cc777fa900ba034cd52" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "CRV" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + }, + "tvl_usd": { + "type": [ + "number", + "null" + ], + "description": "Total value locked in USD", + "example": 18050422129 + }, + "apy": { + "type": "object", + "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.206 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.206 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.18932 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.18932 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.22409 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.22409 + } + } + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Yield accruing inside a yield-bearing underlying token, e.g. the stETH staking yield inside a wstETH pool. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + }, + "stability_30d": { + "type": "object", + "description": "Stability score (0 to 1) of the trailing 30-day APY series, computed as 1 / (1 + coefficient of variation); higher is steadier. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + }, + "base_reward": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + }, + "base_intrinsic": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + }, + "base_reward_intrinsic": { + "type": [ + "number", + "null" + ], + "example": 0.9804 + } + } + }, + "price_per_share": { + "type": [ + "number", + "null" + ], + "description": "Pool token price per share for vault-style pools; null otherwise", + "example": null + }, + "volume_1d_usd": { + "type": [ + "number", + "null" + ], + "description": "Trailing 24h trading volume in USD for DEX pools; null otherwise", + "example": null + }, + "attributes": { + "type": "object", + "description": "Boolean attributes, also available as filters on /yields/v2/earn/query", + "properties": { + "stablecoin_only": { + "type": "boolean", + "description": "All pool assets are stablecoins", + "example": false + }, + "single_asset_exposure": { + "type": "boolean", + "description": "Position is exposed to a single asset", + "example": true + }, + "impermanent_loss_risk": { + "type": "boolean", + "description": "Position can suffer impermanent loss", + "example": false + } + } + }, + "holders": { + "type": "object", + "description": "Pool token holder statistics; values are null where holder data is not tracked", + "properties": { + "count": { + "type": [ + "number", + "null" + ], + "description": "Number of pool token holders", + "example": 618311 + }, + "avg_position_usd": { + "type": [ + "number", + "null" + ], + "description": "Average position size in USD", + "example": 29423.56 + }, + "top_10_share_pct": { + "type": [ + "number", + "null" + ], + "description": "Share of supply held by the top 10 holders, in percent", + "example": 61.97 + } + } + }, + "available_supply_usd": { + "type": [ + "number", + "null" + ], + "description": "Remaining deposit capacity in USD for lending pools with a supply cap (cap minus TVL, floored at 0); null when the pool has no cap", + "example": null + } + } + } + }, + "pagination": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows matching the filters, across all pages", + "example": 4519 + }, + "page": { + "type": "integer", + "example": 1 + }, + "limit": { + "type": "integer", + "example": 100 + } + } + } + } + } + } + } + }, + "400": { + "description": "Unknown query parameter or invalid value", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "INVALID_QUERY_PARAM" + }, + "message": { + "type": "string", + "example": "unknown query parameter: chains" + } + } + } + } + } + } + } + } + } + } + }, + "/yields/v2/earn/{id}/history": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve daily history for an earn pool", + "description": "Daily TVL, attributed APY and price per share for one earn pool, oldest first. APY carries `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day) windows, each attributed into base/reward/total.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Earn pool id (UUID)", + "schema": { + "type": "string", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + } + }, + { + "name": "range", + "in": "query", + "required": false, + "description": "History window; defaults to max (the full series)", + "schema": { + "type": "string", + "enum": [ + "30d", + "90d", + "max" + ], + "example": "90d" + } + } + ], + "responses": { + "200": { + "description": "Daily history rows, oldest first", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Day (UTC)", + "example": "2026-07-27" + }, + "tvl_usd": { + "type": [ + "number", + "null" + ], + "description": "Total value locked in USD at that day", + "example": 18233358161 + }, + "apy": { + "type": "object", + "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components", + "properties": { + "avg_1d": { + "type": "object", + "description": "Average over that day", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.26695 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.26695 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.18878 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.18878 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.22396 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.22396 + } + } + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of a yield-bearing underlying token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "avg_1d": { + "type": "object", + "description": "Average over that day", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + } + } + }, + "price_per_share": { + "type": [ + "number", + "null" + ], + "description": "Pool token price per share for vault-style pools; null otherwise", + "example": null + } + } + } + } + } + } + } + } + }, + "404": { + "description": "No earn pool with this id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "POOL_NOT_FOUND" + }, + "message": { + "type": "string", + "example": "earn pool not found" + } + } + } + } + } + } + } + } + } + } + }, + "/yields/v2/borrow/markets": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve the latest data for all borrow markets", + "description": "One row per borrow market: collateral and debt token, maximum loan-to-value, USD supply/borrow totals and attributed APY for both sides over `current`, `avg_7d` and `avg_30d` windows. Reward emissions offset borrowing costs, so `borrow_cost_apy` totals can be negative (the borrower is net paid).", + "responses": { + "200": { + "description": "Array of all borrow markets", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Market id (UUID)", + "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d" + }, + "pool_key": { + "type": "string", + "description": "Stable market key.", + "example": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8-ethereum" + }, + "pool_token": { + "type": [ + "object", + "null" + ], + "description": "Receipt / vault token representing the position; null when the market has no transferable pool token", + "properties": { + "address": { + "type": "string", + "example": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "aEthWETH" + }, + "name": { + "type": [ + "string", + "null" + ], + "example": "Aave Ethereum WETH" + } + } + }, + "display": { + "type": "object", + "description": "Display strings for listings", + "properties": { + "label": { + "type": [ + "string", + "null" + ], + "description": "Collateral symbol, or \"COLLATERAL / DEBT\" for isolated pairs", + "example": "WETH" + }, + "detail": { + "type": [ + "string", + "null" + ], + "example": null + } + } + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "Market page on the protocol app", + "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_mainnet_v3" + }, + "protocol": { + "type": "string", + "description": "Protocol display name", + "example": "Aave V3" + }, + "chain": { + "type": "string", + "description": "Chain display name", + "example": "Ethereum" + }, + "collateral_token": { + "type": "object", + "description": "Token supplied as collateral; null when unknown", + "properties": { + "address": { + "type": "string", + "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "WETH" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + }, + "borrow_token": { + "type": "object", + "description": "Token borrowed from the market; null when unknown", + "properties": { + "address": { + "type": "string", + "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "WETH" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + }, + "reward_tokens": { + "type": "array", + "description": "Incentive tokens currently emitted to the market; empty when there are none", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0xd533a949740bb3306d119cc777fa900ba034cd52" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "CRV" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + }, + "loan_to_value": { + "type": [ + "number", + "null" + ], + "description": "Maximum loan-to-value as a fraction (0.805 = 80.5%)", + "example": 0.805 + }, + "total_supply_usd": { + "type": [ + "number", + "null" + ], + "description": "Total supplied to the market, in USD", + "example": 3683494475 + }, + "total_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Total borrowed from the market, in USD", + "example": 3022727877 + }, + "available_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Liquidity still available to borrow, in USD", + "example": 568755149 + }, + "supply_apy": { + "type": "object", + "description": "APY in percent earned by suppliers", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 1.49954 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 1.49954 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 1.46669 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 1.46669 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 1.40929 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 1.40929 + } + } + } + } + }, + "borrow_cost_apy": { + "type": "object", + "description": "APY in percent paid by borrowers. Reward emissions reduce the cost, so total = base - reward and can be negative", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.14984 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 2.14984 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.12582 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 2.12582 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.08412 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 2.08412 + } + } + } + } + }, + "intrinsic": { + "type": "object", + "description": "Intrinsic yield of yield-bearing tokens on either side of the market", + "properties": { + "supply": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of the supply-side token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + }, + "borrow": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/yields/v2/borrow/markets/{id}/history": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve daily borrow-side history for a borrow market", + "description": "Daily borrow totals and borrow-cost APY for one market, oldest first. APY carries `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day) windows, each attributed into base/reward/total. Supply-side history for the same id lives at `/yields/v2/earn/{id}/history`.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Borrow market id (UUID)", + "schema": { + "type": "string", + "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d" + } + }, + { + "name": "range", + "in": "query", + "required": false, + "description": "History window; defaults to max (the full series)", + "schema": { + "type": "string", + "enum": [ + "30d", + "90d", + "max" + ], + "example": "90d" + } + } + ], + "responses": { + "200": { + "description": "Daily history rows, oldest first", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Day (UTC)", + "example": "2026-08-10" + }, + "total_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Total borrowed from the market, in USD", + "example": 3339035741 + }, + "available_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Liquidity still available to borrow, in USD", + "example": 733495225 + }, + "borrow_cost_apy": { + "type": "object", + "description": "APY in percent paid by borrowers. Reward emissions reduce the cost, so total = base - reward and can be negative", + "properties": { + "avg_1d": { + "type": "object", + "description": "Average over that day", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.09904 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 2.09904 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.10884 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 2.10884 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.09608 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 2.09608 + } + } + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "avg_1d": { + "type": "object", + "description": "Average over that day", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 2.76481 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.97675 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 4.99742 + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "No borrow market with this id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "BORROW_MARKET_NOT_FOUND" + }, + "message": { + "type": "string", + "example": "borrow market not found" + } + } + } + } + } + } + } + } + } + } + }, + "/yields/v2/borrow/routes": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve the latest data for all borrow routes", + "description": "Every supported borrowing route: a collateral position paired with a debt market on the same protocol and chain. Each row reports the collateral side (supply APY earned on the collateral), the borrow side (cost APY of the debt token) and `net_apy` (collateral yield minus borrow cost). Negative net APY means the position costs more than the collateral earns.", + "responses": { + "200": { + "description": "Array of all borrow routes", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "display": { + "type": "object", + "description": "Display strings for listings", + "properties": { + "detail": { + "type": [ + "string", + "null" + ], + "description": "Market variant label; null when there is only one market", + "example": "Prime Instance" + } + } + }, + "protocol": { + "type": "string", + "description": "Protocol display name", + "example": "Aave V3" + }, + "chain": { + "type": "string", + "description": "Chain display name", + "example": "Ethereum" + }, + "collateral": { + "type": "object", + "description": "The supplied collateral position", + "properties": { + "id": { + "type": "string", + "description": "Collateral pool id (UUID)", + "example": "ef8c5c38-6a41-4383-9dc8-6fb31e69a0c9" + }, + "pool_key": { + "type": "string", + "description": "Stable pool key of the collateral pool", + "example": "0xfa1fdbbd71b0aa16162d76914d69cd8cb3ef92da-lido" + }, + "url": { + "type": [ + "string", + "null" + ], + "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_lido_v3" + }, + "token": { + "type": "object", + "description": "Token supplied as collateral", + "properties": { + "address": { + "type": "string", + "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "WETH" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + }, + "loan_to_value": { + "type": [ + "number", + "null" + ], + "description": "Maximum loan-to-value as a fraction (0.84 = 84%)", + "example": 0.84 + }, + "total_supply_usd": { + "type": [ + "number", + "null" + ], + "description": "Total supplied to the collateral pool, in USD", + "example": 35187139 + }, + "apy": { + "type": "object", + "description": "Supply APY in percent earned on the collateral", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 1.56065 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 1.56065 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 1.48621 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 1.48621 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 1.46718 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 1.46718 + } + } + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of the collateral token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + }, + "reward_tokens": { + "type": "array", + "description": "Incentive tokens emitted to the collateral side; empty when there are none", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0xd533a949740bb3306d119cc777fa900ba034cd52" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "CRV" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + } + } + }, + "borrow": { + "type": "object", + "description": "The borrowed debt position", + "properties": { + "id": { + "type": "string", + "description": "Debt market id (UUID)", + "example": "effcb4a4-4dcb-45e5-935d-f15542c13e6b" + }, + "pool_key": { + "type": "string", + "description": "Stable pool key of the debt market", + "example": "0x2a1fbcb52ed4d9b23dad17e1e8aed4bb0e6079b8-lido" + }, + "url": { + "type": [ + "string", + "null" + ], + "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&marketName=proto_lido_v3" + }, + "token": { + "type": "object", + "description": "Token borrowed", + "properties": { + "address": { + "type": "string", + "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "USDC" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 6 + } + } + }, + "total_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Total borrowed from the market, in USD", + "example": 3377912 + }, + "available_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Liquidity still available to borrow, in USD", + "example": 1838568 + }, + "cost_apy": { + "type": "object", + "description": "Borrow cost APY in percent. Reward emissions reduce the cost, so total = base - reward and can be negative", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 3.8712 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 3.8712 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 3.895 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 3.895 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 3.89527 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": 3.89527 + } + } + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + }, + "reward_tokens": { + "type": "array", + "description": "Incentive tokens emitted to the borrow side; empty when there are none", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0xd533a949740bb3306d119cc777fa900ba034cd52" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "CRV" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 18 + } + } + } + } + } + }, + "net_apy": { + "type": "object", + "description": "Net APY in percent: collateral supply APY minus borrow cost. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": -2.31055 + }, + "base_reward": { + "type": [ + "number", + "null" + ], + "example": -2.31055 + }, + "base_intrinsic": { + "type": [ + "number", + "null" + ], + "example": -2.31055 + }, + "base_reward_intrinsic": { + "type": [ + "number", + "null" + ], + "example": -2.31055 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": -2.40879 + }, + "base_reward": { + "type": [ + "number", + "null" + ], + "example": -2.40879 + }, + "base_intrinsic": { + "type": [ + "number", + "null" + ], + "example": -2.40879 + }, + "base_reward_intrinsic": { + "type": [ + "number", + "null" + ], + "example": -2.40879 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": -2.42809 + }, + "base_reward": { + "type": [ + "number", + "null" + ], + "example": -2.42809 + }, + "base_intrinsic": { + "type": [ + "number", + "null" + ], + "example": -2.42809 + }, + "base_reward_intrinsic": { + "type": [ + "number", + "null" + ], + "example": -2.42809 + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/yields/v2/loops": { + "get": { + "tags": [ + "yields v2" + ], + "summary": "Retrieve the latest data for all loop strategies", + "description": "Leveraged looping opportunities: supply a token, borrow against it and re-supply, repeated `loop_count` times at the market maximum loan-to-value. `loop_apy.total` is the resulting net APY at that leverage; `leverage` reports the accumulated supply and borrow multipliers relative to the initial capital. Borrow reward emissions offset the borrowing cost, so looped APY can exceed the plain supply APY substantially.", + "responses": { + "200": { + "description": "Array of all loop strategies", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Collateral pool id (UUID)", + "example": "f2e554c5-2099-46cf-9fa6-918fb41a3297" + }, + "display": { + "type": "object", + "description": "Display strings for listings", + "properties": { + "detail": { + "type": [ + "string", + "null" + ], + "description": "Market variant label; null when there is only one market", + "example": null + } + } + }, + "protocol": { + "type": "string", + "description": "Protocol display name", + "example": "Scallop Lend" + }, + "chain": { + "type": "string", + "description": "Chain display name", + "example": "Sui" + }, + "token": { + "type": "object", + "description": "Token being looped (supplied and borrowed)", + "properties": { + "address": { + "type": "string", + "example": "0x0041f9f9344cac094454cd574e333c4fdb132d7bcc9379bcd4aab485b2a63942::wbtc::wbtc" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "WBTC" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 8 + } + } + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "Market page on the protocol app", + "example": "https://app.scallop.io/" + }, + "loan_to_value": { + "type": [ + "number", + "null" + ], + "description": "Maximum loan-to-value as a fraction (0.7 = 70%)", + "example": 0.7 + }, + "total_supply_usd": { + "type": [ + "number", + "null" + ], + "description": "Total supplied to the market, in USD", + "example": 99384 + }, + "total_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Total borrowed from the market, in USD", + "example": 40704 + }, + "available_borrow_usd": { + "type": [ + "number", + "null" + ], + "description": "Liquidity still available to borrow, in USD", + "example": 58680 + }, + "supply_apy": { + "type": "object", + "description": "Unlevered supply APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.50779 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.50779 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.38329 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.38329 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 2.35421 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": null + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base plus reward, in percent", + "example": 2.35421 + } + } + } + } + }, + "borrow_cost_apy": { + "type": "object", + "description": "Borrow cost APY in percent. Reward emissions reduce the cost, so total = base - reward and can be negative", + "properties": { + "current": { + "type": "object", + "description": "Latest observed values", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 7.852 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": 21.73055 + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": -13.87855 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 7.74822 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": 38.54927 + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": -30.80105 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "description": "Organic APY in percent, excluding incentive rewards", + "example": 7.70641 + }, + "reward": { + "type": [ + "number", + "null" + ], + "description": "APY in percent from incentive token emissions; null when there are none", + "example": 25.32701 + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "base minus reward, in percent; negative means the borrower is net paid", + "example": -17.6206 + } + } + } + } + }, + "loop_apy": { + "type": "object", + "description": "Looped position APY", + "properties": { + "loop_count": { + "type": [ + "number", + "null" + ], + "description": "Number of borrow/re-supply iterations", + "example": 5 + }, + "total": { + "type": [ + "number", + "null" + ], + "description": "Net APY in percent of the looped position at loop_count iterations", + "example": 34.31646 + } + } + }, + "leverage": { + "type": "object", + "description": "Accumulated leverage after loop_count iterations", + "properties": { + "supply_multiplier": { + "type": [ + "number", + "null" + ], + "description": "Total supplied relative to initial capital", + "example": 2.94117 + }, + "borrow_multiplier": { + "type": [ + "number", + "null" + ], + "description": "Total borrowed relative to initial capital", + "example": 1.94117 + } + } + }, + "intrinsic": { + "type": [ + "object", + "null" + ], + "description": "Intrinsic yield of the looped token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.", + "properties": { + "apy": { + "type": "object", + "description": "Intrinsic APY in percent", + "properties": { + "current": { + "type": "object", + "description": "Latest observed value", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.11 + } + } + }, + "avg_7d": { + "type": "object", + "description": "Trailing 7-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.05 + } + } + }, + "avg_30d": { + "type": "object", + "description": "Trailing 30-day average", + "properties": { + "base": { + "type": [ + "number", + "null" + ], + "example": 3.02 + } + } + } + } + }, + "source_pool": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Earn pool the intrinsic yield is sourced from", + "example": "747c1d2a-c668-4682-b9f9-296708a3dd90" + }, + "pool_token": { + "type": "string", + "description": "Address of the yield-bearing token", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "stETH" + } + } + } + } + }, + "reward_tokens": { + "type": "object", + "description": "Incentive tokens per market side; empty arrays when there are none", + "properties": { + "supply": { + "type": "array", + "description": "Incentive tokens emitted to the supply side", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::scallop_sca" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "sSCA" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 9 + } + } + } + }, + "borrow": { + "type": "array", + "description": "Incentive tokens emitted to the borrow side", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::scallop_sca" + }, + "symbol": { + "type": [ + "string", + "null" + ], + "example": "sSCA" + }, + "decimals": { + "type": [ + "integer", + "null" + ], + "example": 9 + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + }, "/etfs/snapshot": { "get": { "tags": ["ETFs"],