@compass-labs/api-sdk 2.2.109 → 2.2.111

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 (157) hide show
  1. package/dist/commonjs/models/components/accountsummary.d.ts +2 -3
  2. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  3. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  4. package/dist/commonjs/models/components/collateralposition.d.ts +2 -3
  5. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  6. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  7. package/dist/commonjs/models/components/creditborrowparams.d.ts +2 -3
  8. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  10. package/dist/commonjs/models/components/creditborrowrequest.d.ts +2 -3
  11. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  13. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +2 -3
  14. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  16. package/dist/commonjs/models/components/creditlooprequest.d.ts +2 -3
  17. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  19. package/dist/commonjs/models/components/creditloopresponse.d.ts +4 -0
  20. package/dist/commonjs/models/components/creditloopresponse.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/creditloopresponse.js +2 -0
  22. package/dist/commonjs/models/components/creditloopresponse.js.map +1 -1
  23. package/dist/commonjs/models/components/creditprotocol.d.ts +4 -6
  24. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/creditprotocol.js +2 -3
  26. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  27. package/dist/commonjs/models/components/creditrepayparams.d.ts +2 -3
  28. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  30. package/dist/commonjs/models/components/creditrepayrequest.d.ts +2 -3
  31. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  33. package/dist/commonjs/models/components/creditsupplyparams.d.ts +2 -3
  34. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  36. package/dist/commonjs/models/components/creditunlooprequest.d.ts +2 -3
  37. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  38. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  39. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +2 -3
  40. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  41. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  42. package/dist/commonjs/models/components/debtposition.d.ts +2 -3
  43. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  45. package/dist/commonjs/models/components/loopedposition.d.ts +2 -3
  46. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  48. package/dist/commonjs/models/components/morpholendingmarket.d.ts +16 -0
  49. package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +1 -1
  50. package/dist/commonjs/models/components/morpholendingmarket.js +8 -0
  51. package/dist/commonjs/models/components/morpholendingmarket.js.map +1 -1
  52. package/dist/commonjs/models/components/rebalancetarget.d.ts +17 -3
  53. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  54. package/dist/commonjs/models/components/rebalancetarget.js +6 -0
  55. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  56. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +17 -6
  57. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  58. package/dist/commonjs/models/components/rebalancetargetpreview.js +7 -1
  59. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  60. package/dist/esm/models/components/accountsummary.d.ts +2 -3
  61. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  62. package/dist/esm/models/components/accountsummary.js.map +1 -1
  63. package/dist/esm/models/components/collateralposition.d.ts +2 -3
  64. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  65. package/dist/esm/models/components/collateralposition.js.map +1 -1
  66. package/dist/esm/models/components/creditborrowparams.d.ts +2 -3
  67. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  68. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  69. package/dist/esm/models/components/creditborrowrequest.d.ts +2 -3
  70. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  71. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  72. package/dist/esm/models/components/creditenablecollateralparams.d.ts +2 -3
  73. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  74. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  75. package/dist/esm/models/components/creditlooprequest.d.ts +2 -3
  76. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  77. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  78. package/dist/esm/models/components/creditloopresponse.d.ts +4 -0
  79. package/dist/esm/models/components/creditloopresponse.d.ts.map +1 -1
  80. package/dist/esm/models/components/creditloopresponse.js +2 -0
  81. package/dist/esm/models/components/creditloopresponse.js.map +1 -1
  82. package/dist/esm/models/components/creditprotocol.d.ts +4 -6
  83. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  84. package/dist/esm/models/components/creditprotocol.js +2 -3
  85. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  86. package/dist/esm/models/components/creditrepayparams.d.ts +2 -3
  87. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  88. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  89. package/dist/esm/models/components/creditrepayrequest.d.ts +2 -3
  90. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  91. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  92. package/dist/esm/models/components/creditsupplyparams.d.ts +2 -3
  93. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  94. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  95. package/dist/esm/models/components/creditunlooprequest.d.ts +2 -3
  96. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  97. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  98. package/dist/esm/models/components/creditwithdrawparams.d.ts +2 -3
  99. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  100. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  101. package/dist/esm/models/components/debtposition.d.ts +2 -3
  102. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  103. package/dist/esm/models/components/debtposition.js.map +1 -1
  104. package/dist/esm/models/components/loopedposition.d.ts +2 -3
  105. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  106. package/dist/esm/models/components/loopedposition.js.map +1 -1
  107. package/dist/esm/models/components/morpholendingmarket.d.ts +16 -0
  108. package/dist/esm/models/components/morpholendingmarket.d.ts.map +1 -1
  109. package/dist/esm/models/components/morpholendingmarket.js +8 -0
  110. package/dist/esm/models/components/morpholendingmarket.js.map +1 -1
  111. package/dist/esm/models/components/rebalancetarget.d.ts +17 -3
  112. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  113. package/dist/esm/models/components/rebalancetarget.js +6 -0
  114. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  115. package/dist/esm/models/components/rebalancetargetpreview.d.ts +17 -6
  116. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  117. package/dist/esm/models/components/rebalancetargetpreview.js +7 -1
  118. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  119. package/docs/models/components/accountsummary.md +11 -11
  120. package/docs/models/components/collateralposition.md +17 -17
  121. package/docs/models/components/creditborrowparams.md +11 -11
  122. package/docs/models/components/creditborrowrequest.md +21 -21
  123. package/docs/models/components/creditenablecollateralparams.md +7 -7
  124. package/docs/models/components/creditlooprequest.md +19 -19
  125. package/docs/models/components/creditloopresponse.md +1 -0
  126. package/docs/models/components/creditprotocol.md +2 -3
  127. package/docs/models/components/creditrepayparams.md +10 -10
  128. package/docs/models/components/creditrepayrequest.md +20 -20
  129. package/docs/models/components/creditsupplyparams.md +9 -9
  130. package/docs/models/components/creditunlooprequest.md +17 -17
  131. package/docs/models/components/creditwithdrawparams.md +9 -9
  132. package/docs/models/components/debtposition.md +16 -16
  133. package/docs/models/components/loopedposition.md +17 -17
  134. package/docs/models/components/morpholendingmarket.md +4 -0
  135. package/docs/models/components/rebalancetarget.md +13 -10
  136. package/docs/models/components/rebalancetargetpreview.md +19 -16
  137. package/docs/models/components/rebalancetargetpreviewhealthfactorscope.md +1 -1
  138. package/openapi_prepped_for_speakeasy.json +139 -4
  139. package/package.json +1 -1
  140. package/src/models/components/accountsummary.ts +2 -3
  141. package/src/models/components/collateralposition.ts +2 -3
  142. package/src/models/components/creditborrowparams.ts +2 -3
  143. package/src/models/components/creditborrowrequest.ts +2 -3
  144. package/src/models/components/creditenablecollateralparams.ts +2 -3
  145. package/src/models/components/creditlooprequest.ts +2 -3
  146. package/src/models/components/creditloopresponse.ts +6 -0
  147. package/src/models/components/creditprotocol.ts +4 -6
  148. package/src/models/components/creditrepayparams.ts +2 -3
  149. package/src/models/components/creditrepayrequest.ts +2 -3
  150. package/src/models/components/creditsupplyparams.ts +2 -3
  151. package/src/models/components/creditunlooprequest.ts +2 -3
  152. package/src/models/components/creditwithdrawparams.ts +2 -3
  153. package/src/models/components/debtposition.ts +2 -3
  154. package/src/models/components/loopedposition.ts +2 -3
  155. package/src/models/components/morpholendingmarket.ts +24 -0
  156. package/src/models/components/rebalancetarget.ts +23 -3
  157. package/src/models/components/rebalancetargetpreview.ts +23 -6
@@ -25,22 +25,22 @@ let value: CreditLoopRequest = {
25
25
 
26
26
  ## Fields
27
27
 
28
- | Field | Type | Required | Description | Example |
29
- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
- | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x5e5b00ed886A6879C2B934612D2312975427fcAf |
31
- | `chain` | [components.CreditLoopRequestChain](../../models/components/creditlooprequestchain.md) | :heavy_check_mark: | Blockchain network. Not every protocol is deployed on every chain — see the protocol field — and a chain with no credit venue at all returns a 422 naming the chains that do. | ethereum |
32
- | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | 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. | |
33
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
34
- | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault address collateral is supplied to (from /v2/credit/euler_markets). Required when protocol=EULER. | |
35
- | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault address borrowed from (the sub-account's controller). Required when protocol=EULER. | |
36
- | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding this isolated looped position. 0 is the Credit Account itself. | 0 |
37
- | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral each iteration. Must already be in the Credit Account for the initial amount. For MORPHO it must be the market's collateral token. | WETH |
38
- | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed each iteration and swapped back to the collateral token. For MORPHO it must be the market's loan token. | USDC |
39
- | `initialCollateralAmount` | *components.CreditLoopRequestInitialCollateralAmount* | :heavy_check_mark: | Collateral (in token units) that the Credit Account must ALREADY hold when this is called — the loop never pulls from the owner's wallet mid-transaction. Fund the account first via /v2/credit/transfer (action=DEPOSIT). | 1 |
40
- | `multiplier` | *components.CreditLoopRequestMultiplier* | :heavy_check_mark: | Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)). | 2 |
41
- | `loanToValue` | *components.CreditLoopRequestLoanToValue* | :heavy_check_mark: | Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin; Euler's borrow LTV for the collateral vault); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary. | 70 |
42
- | `maxSlippagePercent` | *components.CreditLoopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
43
- | `emodeCategory` | *number* | :heavy_minus_sign: | Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated). Both tokens must belong to the category or the build returns a 422. On Hyperlend (chain=hyperevm) category 1 is the HYPE-correlated set covering wstHYPE and WHYPE. | |
44
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
45
- | `preview` | *boolean* | :heavy_minus_sign: | If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null). NOTE that this guarantees only that no firm quote was spent — it does not guarantee an absent transaction: on a pair no firm provider covers, and under pricing=market, the call still falls through to the aggregator and returns a signable transaction. How the estimate is priced follows `pricing`: on a firm-covered pair under 'auto' or 'firm' it is computed from the firm provider's live price levels (indicative); otherwise swap legs are priced by the default aggregator. Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign — firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered. | false |
46
- | `pricing` | [components.CreditLoopRequestPricing](../../models/components/creditlooprequestpricing.md) | :heavy_minus_sign: | Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing). | auto |
28
+ | Field | Type | Required | Description | Example |
29
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
+ | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x5e5b00ed886A6879C2B934612D2312975427fcAf |
31
+ | `chain` | [components.CreditLoopRequestChain](../../models/components/creditlooprequestchain.md) | :heavy_check_mark: | Blockchain network. Not every protocol is deployed on every chain — see the protocol field — and a chain with no credit venue at all returns a 422 naming the chains that do. | ethereum |
32
+ | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | 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``,<br/>``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``. | |
33
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
34
+ | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault address collateral is supplied to (from /v2/credit/euler_markets). Required when protocol=EULER. | |
35
+ | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault address borrowed from (the sub-account's controller). Required when protocol=EULER. | |
36
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding this isolated looped position. 0 is the Credit Account itself. | 0 |
37
+ | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral each iteration. Must already be in the Credit Account for the initial amount. For MORPHO it must be the market's collateral token. | WETH |
38
+ | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed each iteration and swapped back to the collateral token. For MORPHO it must be the market's loan token. | USDC |
39
+ | `initialCollateralAmount` | *components.CreditLoopRequestInitialCollateralAmount* | :heavy_check_mark: | Collateral (in token units) that the Credit Account must ALREADY hold when this is called — the loop never pulls from the owner's wallet mid-transaction. Fund the account first via /v2/credit/transfer (action=DEPOSIT). | 1 |
40
+ | `multiplier` | *components.CreditLoopRequestMultiplier* | :heavy_check_mark: | Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)). | 2 |
41
+ | `loanToValue` | *components.CreditLoopRequestLoanToValue* | :heavy_check_mark: | Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin; Euler's borrow LTV for the collateral vault); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary. | 70 |
42
+ | `maxSlippagePercent` | *components.CreditLoopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
43
+ | `emodeCategory` | *number* | :heavy_minus_sign: | Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated). Both tokens must belong to the category or the build returns a 422. On Hyperlend (chain=hyperevm) category 1 is the HYPE-correlated set covering wstHYPE and WHYPE. | |
44
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
45
+ | `preview` | *boolean* | :heavy_minus_sign: | If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null). NOTE that this guarantees only that no firm quote was spent — it does not guarantee an absent transaction: on a pair no firm provider covers, and under pricing=market, the call still falls through to the aggregator and returns a signable transaction. How the estimate is priced follows `pricing`: on a firm-covered pair under 'auto' or 'firm' it is computed from the firm provider's live price levels (indicative); otherwise swap legs are priced by the default aggregator. Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign — firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered. | false |
46
+ | `pricing` | [components.CreditLoopRequestPricing](../../models/components/creditlooprequestpricing.md) | :heavy_minus_sign: | Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing). | auto |
@@ -30,6 +30,7 @@ let value: CreditLoopResponse = {
30
30
  | `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false — except firm-priced previews (preview=true on a firm-priced build), which carry numbers only: the firm quotes are fetched at execution time, so there is no payload to sign yet. | |
31
31
  | `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. | |
32
32
  | `preview` | [components.CreditLoopPreview](../../models/components/creditlooppreview.md) | :heavy_check_mark: | Projected end state, computed on guaranteed swap floors. Null only on pricing='firm' preview responses whose target the firm venue cannot serve: no leg was priced on any venue, and the response carries the coverage advisory (max_firm_multiplier) alone. | |
33
+ | `ptMaturity` | *string* | :heavy_minus_sign: | Maturity of the Pendle principal token supplied as collateral, ISO-8601 UTC. Present only for principal-token collateral, whose yield is fixed until this date; after it the position can be unwound (by redemption at par) but not increased. | |
33
34
  | `swapProvider` | [components.CreditLoopResponseSwapProvider](../../models/components/creditloopresponseswapprovider.md) | :heavy_minus_sign: | Identifies which route priced the swap leg(s): 'market' — a DEX aggregator (iterative loop across pool liquidity, slippage-bounded floors) — or 'firm' — zero-slippage quotes, one per swap leg, each partially filled at the leg's size (exact fills, zero dust). On preview=true responses 'firm' means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field. | market |
34
35
  | `quoteExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Deadline of the firm swap quotes (the earliest across the loop's swap legs) — sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Present only on executable firm-priced builds; null on previews (no quote is spent for a preview). | |
35
36
  | `maxFirmMultiplier` | *string* | :heavy_minus_sign: | Multiplier bound firm zero-slippage quotes can fill for the requested position size, LTV and target (estimated without spending any quote). The requested multiplier is firm-servable iff it is <= this value; above it the loop executes at market rate with slippage-bounded floors instead. Present only on preview=true responses when a firm-quote venue covers the pair; null otherwise. Recompute per parameter change - minimum-size floors make reachability target-dependent. | |
@@ -14,9 +14,8 @@ AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
14
14
  chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
15
15
  (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
16
16
 
17
- All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
18
- ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
19
- which rejects EULER with a 422.
17
+ All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
18
+ ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
20
19
 
21
20
  ## Example Usage
22
21