@compass-labs/api-sdk 2.2.102 → 2.2.104
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.
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/encodings.d.ts +10 -9
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +29 -13
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/models/components/accountsummary.d.ts +3 -7
- package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/accountsummary.js.map +1 -1
- package/dist/commonjs/models/components/builder.d.ts +1 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +3 -7
- package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/collateralposition.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +3 -7
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +3 -7
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +3 -7
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/commonjs/models/components/creditloopedpositionsresponse.d.ts +3 -3
- package/dist/commonjs/models/components/creditlooprequest.d.ts +3 -7
- package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
- package/dist/commonjs/models/components/creditloopresponse.d.ts +5 -5
- package/dist/commonjs/models/components/creditloopresponse.js +3 -3
- package/dist/commonjs/models/components/creditloopresponse.js.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.d.ts +6 -14
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.js +3 -7
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +3 -7
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +3 -7
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +3 -7
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
- package/dist/commonjs/models/components/creditunlooprequest.d.ts +3 -7
- package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
- package/dist/commonjs/models/components/creditunloopresponse.d.ts +5 -5
- package/dist/commonjs/models/components/creditunloopresponse.js +3 -3
- package/dist/commonjs/models/components/creditunloopresponse.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +3 -7
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/commonjs/models/components/debtposition.d.ts +3 -7
- package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/debtposition.js.map +1 -1
- package/dist/commonjs/models/components/loopedposition.d.ts +15 -7
- package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/loopedposition.js +6 -0
- package/dist/commonjs/models/components/loopedposition.js.map +1 -1
- package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +3 -3
- package/dist/commonjs/models/components/loopedpositioncurrentstate.js +1 -1
- package/dist/commonjs/models/components/rebalancetarget.d.ts +3 -7
- package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
- package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
- package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +3 -7
- package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
- package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/encodings.d.ts +10 -9
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +29 -13
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/models/components/accountsummary.d.ts +3 -7
- package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
- package/dist/esm/models/components/accountsummary.js.map +1 -1
- package/dist/esm/models/components/builder.d.ts +1 -1
- package/dist/esm/models/components/collateralposition.d.ts +3 -7
- package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
- package/dist/esm/models/components/collateralposition.js.map +1 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +3 -7
- package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowparams.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +3 -7
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.d.ts +3 -7
- package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/esm/models/components/creditloopedpositionsresponse.d.ts +3 -3
- package/dist/esm/models/components/creditlooprequest.d.ts +3 -7
- package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditlooprequest.js.map +1 -1
- package/dist/esm/models/components/creditloopresponse.d.ts +5 -5
- package/dist/esm/models/components/creditloopresponse.js +3 -3
- package/dist/esm/models/components/creditloopresponse.js.map +1 -1
- package/dist/esm/models/components/creditprotocol.d.ts +6 -14
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/esm/models/components/creditprotocol.js +3 -7
- package/dist/esm/models/components/creditprotocol.js.map +1 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +3 -7
- package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayparams.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +3 -7
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +3 -7
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
- package/dist/esm/models/components/creditunlooprequest.d.ts +3 -7
- package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
- package/dist/esm/models/components/creditunloopresponse.d.ts +5 -5
- package/dist/esm/models/components/creditunloopresponse.js +3 -3
- package/dist/esm/models/components/creditunloopresponse.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +3 -7
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/esm/models/components/debtposition.d.ts +3 -7
- package/dist/esm/models/components/debtposition.d.ts.map +1 -1
- package/dist/esm/models/components/debtposition.js.map +1 -1
- package/dist/esm/models/components/loopedposition.d.ts +15 -7
- package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
- package/dist/esm/models/components/loopedposition.js +6 -0
- package/dist/esm/models/components/loopedposition.js.map +1 -1
- package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +3 -3
- package/dist/esm/models/components/loopedpositioncurrentstate.js +1 -1
- package/dist/esm/models/components/rebalancetarget.d.ts +3 -7
- package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
- package/dist/esm/models/components/rebalancetarget.js.map +1 -1
- package/dist/esm/models/components/rebalancetargetpreview.d.ts +3 -7
- package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
- package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
- package/docs/models/components/accountsummary.md +11 -11
- package/docs/models/components/builder.md +4 -4
- package/docs/models/components/collateralposition.md +17 -17
- package/docs/models/components/creditborrowparams.md +11 -11
- package/docs/models/components/creditborrowrequest.md +21 -21
- package/docs/models/components/creditenablecollateralparams.md +7 -7
- package/docs/models/components/creditloopedpositionsresponse.md +6 -6
- package/docs/models/components/creditlooprequest.md +19 -19
- package/docs/models/components/creditloopresponse.md +9 -9
- package/docs/models/components/creditloopresponseswapprovider.md +3 -3
- package/docs/models/components/creditprotocol.md +3 -7
- package/docs/models/components/creditrepayparams.md +10 -10
- package/docs/models/components/creditrepayrequest.md +20 -20
- package/docs/models/components/creditsupplyparams.md +9 -9
- package/docs/models/components/creditunlooprequest.md +17 -17
- package/docs/models/components/creditunloopresponse.md +9 -9
- package/docs/models/components/creditunloopresponseswapprovider.md +3 -3
- package/docs/models/components/creditwithdrawparams.md +9 -9
- package/docs/models/components/debtposition.md +16 -16
- package/docs/models/components/loopedposition.md +17 -14
- package/docs/models/components/loopedpositioncurrentstate.md +1 -1
- package/docs/models/components/loopedpositioncurrentstatehealthfactorscope.md +1 -1
- package/docs/models/components/rebalancetarget.md +10 -10
- package/docs/models/components/rebalancetargetpreview.md +16 -16
- package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/cli.cjs +1 -1
- package/examples/node_modules/tsx/dist/cli.mjs +1 -1
- package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/esm/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/esm/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/index-D1vYaNWZ.cjs +14 -0
- package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +14 -0
- package/examples/node_modules/tsx/dist/loader.cjs +1 -1
- package/examples/node_modules/tsx/dist/loader.mjs +1 -1
- package/examples/node_modules/tsx/dist/package-B1lIY_Tn.cjs +1 -0
- package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +1 -0
- package/examples/node_modules/tsx/dist/{register-C9AniqUt.mjs → register-DHgpdRjs.mjs} +1 -1
- package/examples/node_modules/tsx/dist/{register-Ciecs-Zx.cjs → register-DjPW2kSr.cjs} +2 -2
- package/examples/node_modules/tsx/dist/{register-C557imBs.cjs → register-OY9cqBEN.cjs} +1 -1
- package/examples/node_modules/tsx/dist/{register-C4vWVmug.mjs → register-SoqaU4rg.mjs} +1 -1
- package/examples/node_modules/tsx/dist/repl.cjs +1 -1
- package/examples/node_modules/tsx/dist/repl.mjs +1 -1
- package/examples/node_modules/tsx/dist/{require-DDxgG93A.cjs → require-Blr_8TcJ.cjs} +1 -1
- package/examples/node_modules/tsx/dist/{require-CywAB2e6.mjs → require-Cuv-0BLU.mjs} +1 -1
- package/examples/node_modules/tsx/package.json +1 -1
- package/examples/package-lock.json +3 -3
- package/openapi_prepped_for_speakeasy.json +51 -15
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/encodings.ts +58 -23
- package/src/models/components/accountsummary.ts +3 -7
- package/src/models/components/builder.ts +1 -1
- package/src/models/components/collateralposition.ts +3 -7
- package/src/models/components/creditborrowparams.ts +3 -7
- package/src/models/components/creditborrowrequest.ts +3 -7
- package/src/models/components/creditenablecollateralparams.ts +3 -7
- package/src/models/components/creditloopedpositionsresponse.ts +3 -3
- package/src/models/components/creditlooprequest.ts +3 -7
- package/src/models/components/creditloopresponse.ts +5 -5
- package/src/models/components/creditprotocol.ts +6 -14
- package/src/models/components/creditrepayparams.ts +3 -7
- package/src/models/components/creditrepayrequest.ts +3 -7
- package/src/models/components/creditsupplyparams.ts +3 -7
- package/src/models/components/creditunlooprequest.ts +3 -7
- package/src/models/components/creditunloopresponse.ts +5 -5
- package/src/models/components/creditwithdrawparams.ts +3 -7
- package/src/models/components/debtposition.ts +3 -7
- package/src/models/components/loopedposition.ts +21 -7
- package/src/models/components/loopedpositioncurrentstate.ts +3 -3
- package/src/models/components/rebalancetarget.ts +3 -7
- package/src/models/components/rebalancetargetpreview.ts +3 -7
- package/examples/node_modules/tsx/dist/index-6kqi0x0U.cjs +0 -14
- package/examples/node_modules/tsx/dist/index-DQtFPMc2.mjs +0 -14
- package/examples/node_modules/tsx/dist/package-B13bX4zz.mjs +0 -1
- package/examples/node_modules/tsx/dist/package-sd2gMcZx.cjs +0 -1
|
@@ -30,17 +30,20 @@ let value: LoopedPosition = {
|
|
|
30
30
|
|
|
31
31
|
## Fields
|
|
32
32
|
|
|
33
|
-
| Field
|
|
34
|
-
|
|
|
35
|
-
| `protocol`
|
|
36
|
-
| `marketId`
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
33
|
+
| Field | Type | Required | Description | Example |
|
|
34
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
35
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_check_mark: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path; markets are named by token<br/>symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32<br/>``market_id``. ``EULER`` identifies Euler V2 markets by their EVK<br/>``collateral_vault`` + ``borrow_vault`` addresses and supports isolated<br/>per-sub-account positions (``sub_account_id``).<br/><br/>Deployment is per chain, so a valid protocol can still 422 on a given chain:<br/>AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the<br/>chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM<br/>(where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.<br/><br/>All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and<br/>``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,<br/>which rejects EULER with a 422. | |
|
|
36
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market. | |
|
|
37
|
+
| `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding this position. Euler isolates each loop in its own sub-account, so this is part of the position's identity — two loops on the same vault pair in different sub-accounts are two separate positions. | |
|
|
38
|
+
| `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault holding the collateral. Euler markets are identified by their vault pair rather than by a market id, and the same underlying token can back several different vaults. | |
|
|
39
|
+
| `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK controller vault the debt is owed to. | |
|
|
40
|
+
| `collateralToken` | *string* | :heavy_check_mark: | Address of the collateral token. | |
|
|
41
|
+
| `collateralSymbol` | *string* | :heavy_check_mark: | Symbol of the collateral token. | |
|
|
42
|
+
| `debtToken` | *string* | :heavy_check_mark: | Address of the debt token. | |
|
|
43
|
+
| `debtSymbol` | *string* | :heavy_check_mark: | Symbol of the debt token. | |
|
|
44
|
+
| `status` | [components.LoopedPositionStatus](../../models/components/loopedpositionstatus.md) | :heavy_check_mark: | Whether the position is currently open or fully closed. | |
|
|
45
|
+
| `openedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Timestamp of the position's first transaction. | |
|
|
46
|
+
| `closedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Timestamp the position was fully closed; null while open. | |
|
|
47
|
+
| `current` | [components.LoopedPositionCurrentState](../../models/components/loopedpositioncurrentstate.md) | :heavy_minus_sign: | Live on-chain state; null for CLOSED positions. | |
|
|
48
|
+
| `totals` | [components.LoopedPositionTotals](../../models/components/loopedpositiontotals.md) | :heavy_check_mark: | Lifetime totals across all of a looped position's transactions. | |
|
|
49
|
+
| `history` | [components.LoopedPositionHistoryEntry](../../models/components/loopedpositionhistoryentry.md)[] | :heavy_minus_sign: | All transactions for this position, chronological. | [] |
|
|
@@ -25,7 +25,7 @@ let value: LoopedPositionCurrentState = {
|
|
|
25
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
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
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'
|
|
28
|
+
| `healthFactorScope` | [components.LoopedPositionCurrentStateHealthFactorScope](../../models/components/loopedpositioncurrentstatehealthfactorscope.md) | :heavy_check_mark: | How widely this health factor applies. 'market' means it is isolated rather than account-wide: a Morpho market's collateral backs only that market's debt, and an Euler sub-account's collateral backs only its own controller's debt. Note that an Euler figure is scoped to the SUB-ACCOUNT, so if several positions share one sub-account they all report the same health factor and are liquidated together — it is not each position's independent 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
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
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
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. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# LoopedPositionCurrentStateHealthFactorScope
|
|
2
2
|
|
|
3
|
-
'market'
|
|
3
|
+
How widely this health factor applies. 'market' means it is isolated rather than account-wide: a Morpho market's collateral backs only that market's debt, and an Euler sub-account's collateral backs only its own controller's debt. Note that an Euler figure is scoped to the SUB-ACCOUNT, so if several positions share one sub-account they all report the same health factor and are liquidated together — it is not each position's independent 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.
|
|
4
4
|
|
|
5
5
|
## Example Usage
|
|
6
6
|
|