@compass-labs/api-sdk 2.2.95 → 2.2.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/models/components/chainmarketinfo.d.ts +5 -1
  4. package/dist/commonjs/models/components/chainmarketinfo.d.ts.map +1 -1
  5. package/dist/commonjs/models/components/chainmarketinfo.js +2 -0
  6. package/dist/commonjs/models/components/chainmarketinfo.js.map +1 -1
  7. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +25 -3
  8. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/loopedpositioncurrentstate.js +8 -0
  10. package/dist/commonjs/models/components/loopedpositioncurrentstate.js.map +1 -1
  11. package/dist/commonjs/models/components/morpholendingmarket.d.ts +8 -0
  12. package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/morpholendingmarket.js +4 -0
  14. package/dist/commonjs/models/components/morpholendingmarket.js.map +1 -1
  15. package/dist/commonjs/models/components/reserveinfo.d.ts +5 -1
  16. package/dist/commonjs/models/components/reserveinfo.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/reserveinfo.js +2 -0
  18. package/dist/commonjs/models/components/reserveinfo.js.map +1 -1
  19. package/dist/esm/lib/config.d.ts +2 -2
  20. package/dist/esm/lib/config.js +2 -2
  21. package/dist/esm/models/components/chainmarketinfo.d.ts +5 -1
  22. package/dist/esm/models/components/chainmarketinfo.d.ts.map +1 -1
  23. package/dist/esm/models/components/chainmarketinfo.js +2 -0
  24. package/dist/esm/models/components/chainmarketinfo.js.map +1 -1
  25. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +25 -3
  26. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts.map +1 -1
  27. package/dist/esm/models/components/loopedpositioncurrentstate.js +8 -0
  28. package/dist/esm/models/components/loopedpositioncurrentstate.js.map +1 -1
  29. package/dist/esm/models/components/morpholendingmarket.d.ts +8 -0
  30. package/dist/esm/models/components/morpholendingmarket.d.ts.map +1 -1
  31. package/dist/esm/models/components/morpholendingmarket.js +4 -0
  32. package/dist/esm/models/components/morpholendingmarket.js.map +1 -1
  33. package/dist/esm/models/components/reserveinfo.d.ts +5 -1
  34. package/dist/esm/models/components/reserveinfo.d.ts.map +1 -1
  35. package/dist/esm/models/components/reserveinfo.js +2 -0
  36. package/dist/esm/models/components/reserveinfo.js.map +1 -1
  37. package/docs/models/components/chainmarketinfo.md +15 -14
  38. package/docs/models/components/loopedpositioncurrentstate.md +17 -13
  39. package/docs/models/components/morpholendingmarket.md +23 -21
  40. package/docs/models/components/reserveinfo.md +14 -13
  41. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -1
  42. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -1
  43. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
  44. package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -1
  45. package/examples/node_modules/tsx/dist/cli.cjs +2 -2
  46. package/examples/node_modules/tsx/dist/cli.mjs +2 -2
  47. package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -1
  48. package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -1
  49. package/examples/node_modules/tsx/dist/esm/index.cjs +1 -1
  50. package/examples/node_modules/tsx/dist/esm/index.mjs +1 -1
  51. package/examples/node_modules/tsx/dist/index-CVGQLgGk.mjs +14 -0
  52. package/examples/node_modules/tsx/dist/index-LWEOpzQe.cjs +14 -0
  53. package/examples/node_modules/tsx/dist/loader.cjs +1 -1
  54. package/examples/node_modules/tsx/dist/loader.mjs +1 -1
  55. package/examples/node_modules/tsx/dist/package-BUjYdoyo.mjs +1 -0
  56. package/examples/node_modules/tsx/dist/package-BqWb5wzm.cjs +1 -0
  57. package/examples/node_modules/tsx/dist/preflight.cjs +1 -1
  58. package/examples/node_modules/tsx/dist/preflight.mjs +1 -1
  59. package/examples/node_modules/tsx/dist/{register-HWZIKnmC.mjs → register-A6mos5aG.mjs} +1 -1
  60. package/examples/node_modules/tsx/dist/{register-zZ7SWseA.mjs → register-B_kKY3fL.mjs} +1 -1
  61. package/examples/node_modules/tsx/dist/{register-BoI6-WNn.cjs → register-CptX03bE.cjs} +1 -1
  62. package/examples/node_modules/tsx/dist/{register-DlUHyDDv.cjs → register-DQV4TtD3.cjs} +2 -2
  63. package/examples/node_modules/tsx/dist/repl.cjs +1 -1
  64. package/examples/node_modules/tsx/dist/repl.mjs +1 -1
  65. package/examples/node_modules/tsx/dist/{require-awuW45Q3.mjs → require-Cbdk4ZrE.mjs} +1 -1
  66. package/examples/node_modules/tsx/dist/{require-C7ivLNeu.cjs → require-bPEuCWoO.cjs} +1 -1
  67. package/examples/node_modules/tsx/package.json +1 -1
  68. package/examples/package-lock.json +3 -3
  69. package/openapi_prepped_for_speakeasy.json +101 -5
  70. package/package.json +1 -1
  71. package/src/lib/config.ts +2 -2
  72. package/src/models/components/chainmarketinfo.ts +7 -1
  73. package/src/models/components/loopedpositioncurrentstate.ts +33 -3
  74. package/src/models/components/morpholendingmarket.ts +12 -0
  75. package/src/models/components/reserveinfo.ts +7 -1
  76. package/examples/node_modules/tsx/dist/index-BN2t1Mfo.cjs +0 -14
  77. package/examples/node_modules/tsx/dist/index-CQhDiIsg.mjs +0 -14
  78. package/examples/node_modules/tsx/dist/package-CiRlP2hu.mjs +0 -1
  79. package/examples/node_modules/tsx/dist/package-DYbiKo1t.cjs +0 -1
@@ -30,17 +30,18 @@ let value: ChainMarketInfo = {
30
30
 
31
31
  ## Fields
32
32
 
33
- | Field | Type | Required | Description | Example |
34
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
- | `address` | *string* | :heavy_check_mark: | Underlying token (reserve) contract address on this chain. This is Aave's canonical per-reserve identifier. | |
36
- | `aTokenAddress` | *string* | :heavy_check_mark: | Aave aToken contract address on this chain. This is the interest-bearing token that represents the supply position. | |
37
- | `supplyApy` | *string* | :heavy_check_mark: | Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). | |
38
- | `borrowApy` | *string* | :heavy_check_mark: | Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%). | |
39
- | `supplyApyAvg` | *string* | :heavy_check_mark: | Variable rate APY for deposits averaged over the `days` window in the request (default 30 days), in percentage. Computed the same way as the v1 `/v1/aave/avg_rate` endpoint. | |
40
- | `borrowApyAvg` | *string* | :heavy_check_mark: | Variable rate APY for loans averaged over the `days` window in the request (default 30 days), in percentage. Computed the same way as the v1 `/v1/aave/avg_rate` endpoint. | |
41
- | `totalBorrowed` | *string* | :heavy_check_mark: | Total amount currently borrowed from this market, in token units (e.g., 1234567.89 USDC). | |
42
- | `availableLiquidity` | *string* | :heavy_check_mark: | Amount of tokens available to borrow, in token units. Equals total supplied minus total borrowed. | |
43
- | `utilizationRate` | *string* | :heavy_check_mark: | Percentage of supplied tokens that are currently borrowed (e.g., 85.0 means 85%). | |
44
- | `ltv` | *string* | :heavy_check_mark: | Maximum loan-to-value when this reserve is used as collateral, in percentage (e.g., 80.0 means 80%). This is the highest LTV you can borrow at against this asset; 0 means it cannot be used as collateral. | |
45
- | `liquidationThreshold` | *string* | :heavy_check_mark: | Liquidation threshold when this reserve is used as collateral, in percentage (e.g., 82.5 means 82.5%). A position whose LTV crosses this can be liquidated; 0 means the asset cannot be used as collateral. | |
46
- | `reserves` | [components.ReserveInfo](../../models/components/reserveinfo.md)[] | :heavy_minus_sign: | Every Aave reserve for this token on this chain, ordered by liquidity (highest first). Identified by underlying `address`. For most tokens this has a single entry equal to the canonical reserve above; where a chain has multiple reserves for one symbol (e.g. Arbitrum native USDC and bridged USDC.e), all are listed with their individual rates. | [] |
33
+ | Field | Type | Required | Description | Example |
34
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `address` | *string* | :heavy_check_mark: | Underlying token (reserve) contract address on this chain. This is Aave's canonical per-reserve identifier. | |
36
+ | `aTokenAddress` | *string* | :heavy_check_mark: | Aave aToken contract address on this chain. This is the interest-bearing token that represents the supply position. | |
37
+ | `supplyApy` | *string* | :heavy_check_mark: | Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). This is LENDING interest only — what borrowers pay. For a staked or wrapped asset it is not the whole yield; add `intrinsic_apy`. | |
38
+ | `intrinsicApy` | *string* | :heavy_minus_sign: | What holding this asset earns OUTSIDE the lending pool, in percentage: staking rewards or vault yield accruing inside the token's own exchange rate, which the pool neither pays nor observes. A trailing 7-day measurement. ABSENT when no measurement is available (the route omits null fields) — absent does not mean zero. For an asset that plainly earns beyond lending (wstETH, sUSDe, wstHYPE) `supply_apy` alone understates what it earns by percentage points, since almost nobody borrows these and their supply rate rounds to nothing: Hyperlend's wstHYPE reserve pays 0.00006% against a ~2.5% staking yield. Treat an absent value as unknown rather than as the asset earning nothing beyond `supply_apy`. | |
39
+ | `borrowApy` | *string* | :heavy_check_mark: | Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%). | |
40
+ | `supplyApyAvg` | *string* | :heavy_check_mark: | Variable rate APY for deposits averaged over the `days` window in the request (default 30 days), in percentage. Computed the same way as the v1 `/v1/aave/avg_rate` endpoint. | |
41
+ | `borrowApyAvg` | *string* | :heavy_check_mark: | Variable rate APY for loans averaged over the `days` window in the request (default 30 days), in percentage. Computed the same way as the v1 `/v1/aave/avg_rate` endpoint. | |
42
+ | `totalBorrowed` | *string* | :heavy_check_mark: | Total amount currently borrowed from this market, in token units (e.g., 1234567.89 USDC). | |
43
+ | `availableLiquidity` | *string* | :heavy_check_mark: | Amount of tokens available to borrow, in token units. Equals total supplied minus total borrowed. | |
44
+ | `utilizationRate` | *string* | :heavy_check_mark: | Percentage of supplied tokens that are currently borrowed (e.g., 85.0 means 85%). | |
45
+ | `ltv` | *string* | :heavy_check_mark: | Maximum loan-to-value when this reserve is used as collateral, in percentage (e.g., 80.0 means 80%). This is the highest LTV you can borrow at against this asset; 0 means it cannot be used as collateral. | |
46
+ | `liquidationThreshold` | *string* | :heavy_check_mark: | Liquidation threshold when this reserve is used as collateral, in percentage (e.g., 82.5 means 82.5%). A position whose LTV crosses this can be liquidated; 0 means the asset cannot be used as collateral. | |
47
+ | `reserves` | [components.ReserveInfo](../../models/components/reserveinfo.md)[] | :heavy_minus_sign: | Every Aave reserve for this token on this chain, ordered by liquidity (highest first). Identified by underlying `address`. For most tokens this has a single entry equal to the canonical reserve above; where a chain has multiple reserves for one symbol (e.g. Arbitrum native USDC and bridged USDC.e), all are listed with their individual rates. | [] |
@@ -16,16 +16,20 @@ let value: LoopedPositionCurrentState = {
16
16
 
17
17
  ## Fields
18
18
 
19
- | Field | Type | Required | Description |
20
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | `collateralAmount` | *string* | :heavy_check_mark: | Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution — bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split. |
22
- | `debtAmount` | *string* | :heavy_check_mark: | Current on-chain debt amount for this position. |
23
- | `collateralUsd` | *string* | :heavy_minus_sign: | Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions. |
24
- | `debtUsd` | *string* | :heavy_minus_sign: | Debt value in USD (null if unpriced). |
25
- | `netUsdValue` | *string* | :heavy_minus_sign: | Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth). |
26
- | `leverage` | *string* | :heavy_minus_sign: | Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth). |
27
- | `healthFactor` | *string* | :heavy_minus_sign: | Health factor. Above 1 is safe; below 1 risks liquidation. See health_factor_scope for what it covers. |
28
- | `healthFactorScope` | [components.LoopedPositionCurrentStateHealthFactorScope](../../models/components/loopedpositioncurrentstatehealthfactorscope.md) | :heavy_check_mark: | 'market' for Morpho (isolated per-market health). 'account' for Aave: collateral is pooled, so all collateral backs all debt and this health factor is shared by every Aave position on the account — see aave_account_summary for the account-level figures. |
29
- | `collateralApy` | *string* | :heavy_minus_sign: | What the collateral leg currently earns, in percentage (e.g. 6.12 = 6.12%). Aave: the collateral reserve's spot supply APY. Morpho: the collateral token's own yield its 7d vault APY when it is an indexed vault share (e.g. steakUSDC); null otherwise, since Morpho collateral earns nothing from the market itself and an unindexed token's intrinsic yield is unknown. |
30
- | `borrowApy` | *string* | :heavy_minus_sign: | What the debt leg currently costs, in percentage: the market's spot borrow APY (Morpho IRM rate / Aave variable borrow rate). Null when the rate read was unavailable. |
31
- | `netApy` | *string* | :heavy_minus_sign: | Levered net yield on the position's equity, in percentage: leverage x collateral_apy - (leverage - 1) x borrow_apy. Negative means the carry is upside down (borrowing costs more than the collateral earns). Null when leverage or either leg is unknown. The collateral leg of a Morpho vault-share position is a 7d average while the borrow leg is spot. |
19
+ | Field | Type | Required | Description |
20
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `collateralAmount` | *string* | :heavy_check_mark: | Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution — bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split. |
22
+ | `debtAmount` | *string* | :heavy_check_mark: | Current on-chain debt amount for this position. |
23
+ | `collateralUsd` | *string* | :heavy_minus_sign: | Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions. |
24
+ | `debtUsd` | *string* | :heavy_minus_sign: | Debt value in USD (null if unpriced). |
25
+ | `netUsdValue` | *string* | :heavy_minus_sign: | Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth). |
26
+ | `leverage` | *string* | :heavy_minus_sign: | Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth). |
27
+ | `healthFactor` | *string* | :heavy_minus_sign: | Health factor. Above 1 is safe; below 1 risks liquidation. See health_factor_scope for what it covers. |
28
+ | `healthFactorScope` | [components.LoopedPositionCurrentStateHealthFactorScope](../../models/components/loopedpositioncurrentstatehealthfactorscope.md) | :heavy_check_mark: | 'market' for Morpho (isolated per-market health). 'account' for Aave: collateral is pooled, so all collateral backs all debt and this health factor is shared by every Aave position on the account — see aave_account_summary for the account-level figures. |
29
+ | `collateralApy` | *string* | :heavy_minus_sign: | What the collateral leg currently earns, in percentage (e.g. 6.12 = 6.12%) the sum of collateral_lending_apy and collateral_intrinsic_apy where both apply. Null when the token earns a yield outside the lending pool (a staked or wrapped asset) and no source for that yield is available: the pool's supply APY alone would understate the leg by percentage points and can invert the sign of net_apy, so it is withheld rather than reported as the whole yield. |
30
+ | `collateralLendingApy` | *string* | :heavy_minus_sign: | The supply half of the collateral leg, in percentage: interest paid by borrowers of the collateral asset (Aave supply APY). Near zero for staked assets, which almost nobody borrows. Exactly 0 on Morpho, whose collateral is held rather than lent — which is why a Morpho position's whole collateral leg is its vault yield. |
31
+ | `collateralIntrinsicApy` | *string* | :heavy_minus_sign: | The yield the collateral token earns inside its own price, in percentage, independent of the lending pool — a liquid-staking token's staking rewards (wstHYPE against HYPE) or an ERC-4626 share's vault yield which of the two follows from the position's protocol. Null when the token has none or none is indexed.<br/><br/>A TRAILING 7-DAY measurement, not a forward rate: a week is a short sample of a staking rate, so consecutive readings move around the longer-run average by a few tenths of a percent.<br/><br/>A null here alongside a null collateral_apy and a NON-null collateral_lending_apy is the meaningful case: the token does earn outside the pool, but no source for that yield is available, so the total is withheld rather than understated. |
32
+ | `borrowApy` | *string* | :heavy_minus_sign: | What the debt leg currently costs, in percentage — the sum of borrow_lending_apy and borrow_intrinsic_apy where both apply. Debt owed in a token that appreciates inside its own price (a staked or wrapped asset) grows by that appreciation on top of the pool's interest, so the pool rate alone would understate the cost and overstate net_apy; for such a token with no yield source available this is null (withheld) rather than the pool rate. For ordinary debt assets it equals the market's spot borrow APY. Null also when the rate read was unavailable. |
33
+ | `borrowLendingApy` | *string* | :heavy_minus_sign: | The pool half of the debt leg, in percentage: the market's spot borrow APY (Morpho IRM rate / Aave variable borrow rate) — interest charged on the debt by the lending market itself. |
34
+ | `borrowIntrinsicApy` | *string* | :heavy_minus_sign: | The yield the DEBT token earns inside its own price, in percentage — which the borrower owes on top of pool interest, since the debt is denominated in an appreciating token. Same source and trailing 7-day window as collateral_intrinsic_apy. Null when the token has none or none is indexed; null alongside a null borrow_apy and a NON-null borrow_lending_apy means the debt token does earn outside the pool but no source is available, so the total cost is withheld rather than understated. |
35
+ | `netApy` | *string* | :heavy_minus_sign: | Levered net yield on the position's equity, in percentage: leverage x collateral_apy - (leverage - 1) x borrow_apy. Negative means the carry is upside down (borrowing costs more than the collateral earns). Null when leverage or either leg is unknown. This is a SNAPSHOT at today's rates, not a forecast, and it mixes a trailing collateral measurement with a spot borrow rate. It is also denominated in the debt asset, not USD: a wstHYPE/WHYPE loop earning a positive net_apy still loses USD value if HYPE falls. The borrow leg floats with the debt reserve's utilisation, so this figure can move without the position changing at all. |
@@ -28,24 +28,26 @@ let value: MorphoLendingMarket = {
28
28
 
29
29
  ## Fields
30
30
 
31
- | Field | Type | Required | Description |
32
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
- | `marketId` | *string* | :heavy_check_mark: | Morpho Blue market id — the bytes32 keccak of the market's (loanToken, collateralToken, oracle, irm, lltv) tuple. Pass this to the Morpho credit actions to identify the market. |
34
- | `loanToken` | *string* | :heavy_check_mark: | Token that is supplied and borrowed in this market. |
35
- | `loanTokenSymbol` | *string* | :heavy_check_mark: | Symbol of the loan token (e.g. USDC). |
36
- | `loanTokenDecimals` | *number* | :heavy_check_mark: | Decimals of the loan token. |
37
- | `collateralToken` | *string* | :heavy_check_mark: | Token accepted as collateral in this market. |
38
- | `collateralTokenSymbol` | *string* | :heavy_check_mark: | Symbol of the collateral token (e.g. wstETH). |
39
- | `collateralTokenDecimals` | *number* | :heavy_check_mark: | Decimals of the collateral token. |
40
- | `oracle` | *string* | :heavy_check_mark: | Oracle pricing the collateral in loan-token terms for this market. |
41
- | `irm` | *string* | :heavy_check_mark: | Interest rate model contract of this market. |
42
- | `lltv` | *string* | :heavy_check_mark: | Liquidation loan-to-value in percentage (e.g. 86 means a position is liquidatable once debt exceeds 86% of collateral value). |
43
- | `supplyApy` | *string* | :heavy_minus_sign: | Current supply APY for lending the loan token, in percentage (e.g. 3.5 means 3.5%). Null if the rate is unavailable. |
44
- | `borrowApy` | *string* | :heavy_minus_sign: | Current borrow APY for the loan token, in percentage (e.g. 5.25 means 5.25%). Null if the rate is unavailable. |
45
- | `utilization` | *string* | :heavy_check_mark: | Borrowed share of supplied assets, in percentage 0-100. |
46
- | `totalSupplyAssets` | *string* | :heavy_check_mark: | Total loan tokens supplied to the market, in token units. |
47
- | `totalBorrowAssets` | *string* | :heavy_check_mark: | Total loan tokens borrowed from the market, in token units. |
48
- | `availableLiquidity` | *string* | :heavy_check_mark: | Loan tokens available to borrow or withdraw (supplied - borrowed), in token units. |
49
- | `fee` | *string* | :heavy_check_mark: | Protocol fee taken from interest, in percentage of interest (e.g. 0 means no fee). |
50
- | `tvlUsd` | *string* | :heavy_minus_sign: | Total value locked (total supplied assets) in USD, sourced from the indexer. Null if the indexer hasn't priced this market yet. |
51
- | `liquidityUsd` | *string* | :heavy_minus_sign: | Available liquidity (supplied - borrowed) in USD, sourced from the indexer. Null if the indexer hasn't priced this market yet. |
31
+ | Field | Type | Required | Description |
32
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
33
+ | `marketId` | *string* | :heavy_check_mark: | Morpho Blue market id — the bytes32 keccak of the market's (loanToken, collateralToken, oracle, irm, lltv) tuple. Pass this to the Morpho credit actions to identify the market. |
34
+ | `loanToken` | *string* | :heavy_check_mark: | Token that is supplied and borrowed in this market. |
35
+ | `loanTokenSymbol` | *string* | :heavy_check_mark: | Symbol of the loan token (e.g. USDC). |
36
+ | `loanTokenDecimals` | *number* | :heavy_check_mark: | Decimals of the loan token. |
37
+ | `collateralToken` | *string* | :heavy_check_mark: | Token accepted as collateral in this market. |
38
+ | `collateralTokenSymbol` | *string* | :heavy_check_mark: | Symbol of the collateral token (e.g. wstETH). |
39
+ | `collateralTokenDecimals` | *number* | :heavy_check_mark: | Decimals of the collateral token. |
40
+ | `oracle` | *string* | :heavy_check_mark: | Oracle pricing the collateral in loan-token terms for this market. |
41
+ | `irm` | *string* | :heavy_check_mark: | Interest rate model contract of this market. |
42
+ | `lltv` | *string* | :heavy_check_mark: | Liquidation loan-to-value in percentage (e.g. 86 means a position is liquidatable once debt exceeds 86% of collateral value). |
43
+ | `supplyApy` | *string* | :heavy_minus_sign: | Current supply APY for lending the loan token, in percentage (e.g. 3.5 means 3.5%). Null if the rate is unavailable. |
44
+ | `borrowApy` | *string* | :heavy_minus_sign: | Current borrow APY for the loan token, in percentage (e.g. 5.25 means 5.25%). Null if the rate is unavailable. |
45
+ | `collateralIntrinsicApy` | *string* | :heavy_minus_sign: | What the COLLATERAL token earns inside its own price, in percentage: an ERC-4626 share's vault yield or a staking token's rewards, trailing 7 days. Morpho holds collateral without lending it out, so this is the collateral leg's ENTIRE yield. Null means unmeasured, NOT zero — a plain token (WETH, cbBTC) earns nothing and a yield-bearing one may simply not be indexed yet. |
46
+ | `loanIntrinsicApy` | *string* | :heavy_minus_sign: | What the LOAN token earns inside its own price, in percentage, trailing 7 days. Debt owed in such a token grows by this on top of borrow_apy — a borrower's true cost is their sum. Null means unmeasured, NOT zero. |
47
+ | `utilization` | *string* | :heavy_check_mark: | Borrowed share of supplied assets, in percentage 0-100. |
48
+ | `totalSupplyAssets` | *string* | :heavy_check_mark: | Total loan tokens supplied to the market, in token units. |
49
+ | `totalBorrowAssets` | *string* | :heavy_check_mark: | Total loan tokens borrowed from the market, in token units. |
50
+ | `availableLiquidity` | *string* | :heavy_check_mark: | Loan tokens available to borrow or withdraw (supplied - borrowed), in token units. |
51
+ | `fee` | *string* | :heavy_check_mark: | Protocol fee taken from interest, in percentage of interest (e.g. 0 means no fee). |
52
+ | `tvlUsd` | *string* | :heavy_minus_sign: | Total value locked (total supplied assets) in USD, sourced from the indexer. Null if the indexer hasn't priced this market yet. |
53
+ | `liquidityUsd` | *string* | :heavy_minus_sign: | Available liquidity (supplied - borrowed) in USD, sourced from the indexer. Null if the indexer hasn't priced this market yet. |