@compass-labs/api-sdk 2.2.101 → 2.2.103

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 (223) hide show
  1. package/dist/commonjs/funcs/creditCreditBorrow.d.ts +1 -1
  2. package/dist/commonjs/funcs/creditCreditBorrow.js +1 -1
  3. package/dist/commonjs/funcs/creditCreditLoop.d.ts +8 -22
  4. package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/creditCreditLoop.js +8 -22
  6. package/dist/commonjs/funcs/creditCreditLoop.js.map +1 -1
  7. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts +8 -7
  8. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  9. package/dist/commonjs/funcs/creditCreditLoopedPositions.js +8 -7
  10. package/dist/commonjs/funcs/creditCreditLoopedPositions.js.map +1 -1
  11. package/dist/commonjs/funcs/creditCreditRebalance.d.ts +11 -34
  12. package/dist/commonjs/funcs/creditCreditRebalance.d.ts.map +1 -1
  13. package/dist/commonjs/funcs/creditCreditRebalance.js +11 -34
  14. package/dist/commonjs/funcs/creditCreditRebalance.js.map +1 -1
  15. package/dist/commonjs/funcs/creditCreditRepay.d.ts +1 -1
  16. package/dist/commonjs/funcs/creditCreditRepay.js +1 -1
  17. package/dist/commonjs/funcs/creditCreditUnloop.d.ts +7 -38
  18. package/dist/commonjs/funcs/creditCreditUnloop.d.ts.map +1 -1
  19. package/dist/commonjs/funcs/creditCreditUnloop.js +7 -38
  20. package/dist/commonjs/funcs/creditCreditUnloop.js.map +1 -1
  21. package/dist/commonjs/lib/config.d.ts +2 -2
  22. package/dist/commonjs/lib/config.js +2 -2
  23. package/dist/commonjs/models/components/accountsummary.d.ts +18 -5
  24. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  26. package/dist/commonjs/models/components/collateralposition.d.ts +18 -5
  27. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  29. package/dist/commonjs/models/components/creditborrowparams.d.ts +18 -5
  30. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  32. package/dist/commonjs/models/components/creditborrowrequest.d.ts +18 -5
  33. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  35. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +18 -5
  36. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  38. package/dist/commonjs/models/components/creditlooprequest.d.ts +27 -14
  39. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/creditlooprequest.js +1 -1
  41. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  42. package/dist/commonjs/models/components/creditloopresponse.d.ts +7 -7
  43. package/dist/commonjs/models/components/creditloopresponse.js +3 -3
  44. package/dist/commonjs/models/components/creditloopresponse.js.map +1 -1
  45. package/dist/commonjs/models/components/creditprotocol.d.ts +36 -10
  46. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/creditprotocol.js +18 -5
  48. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  49. package/dist/commonjs/models/components/creditrepayparams.d.ts +18 -5
  50. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  52. package/dist/commonjs/models/components/creditrepayrequest.d.ts +18 -5
  53. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  54. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  55. package/dist/commonjs/models/components/creditsupplyparams.d.ts +18 -5
  56. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  58. package/dist/commonjs/models/components/creditunlooprequest.d.ts +23 -10
  59. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  60. package/dist/commonjs/models/components/creditunlooprequest.js +1 -1
  61. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  62. package/dist/commonjs/models/components/creditunloopresponse.d.ts +7 -7
  63. package/dist/commonjs/models/components/creditunloopresponse.js +3 -3
  64. package/dist/commonjs/models/components/creditunloopresponse.js.map +1 -1
  65. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +18 -5
  66. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  67. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  68. package/dist/commonjs/models/components/debtposition.d.ts +18 -5
  69. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  70. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  71. package/dist/commonjs/models/components/loopedposition.d.ts +18 -5
  72. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  74. package/dist/commonjs/models/components/rebalancetarget.d.ts +18 -5
  75. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  76. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  77. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +18 -5
  78. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  79. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  80. package/dist/commonjs/models/components/swapinfo.d.ts +2 -2
  81. package/dist/commonjs/sdk/credit.d.ts +44 -111
  82. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  83. package/dist/commonjs/sdk/credit.js +44 -111
  84. package/dist/commonjs/sdk/credit.js.map +1 -1
  85. package/dist/esm/funcs/creditCreditBorrow.d.ts +1 -1
  86. package/dist/esm/funcs/creditCreditBorrow.js +1 -1
  87. package/dist/esm/funcs/creditCreditLoop.d.ts +8 -22
  88. package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -1
  89. package/dist/esm/funcs/creditCreditLoop.js +8 -22
  90. package/dist/esm/funcs/creditCreditLoop.js.map +1 -1
  91. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +8 -7
  92. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  93. package/dist/esm/funcs/creditCreditLoopedPositions.js +8 -7
  94. package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -1
  95. package/dist/esm/funcs/creditCreditRebalance.d.ts +11 -34
  96. package/dist/esm/funcs/creditCreditRebalance.d.ts.map +1 -1
  97. package/dist/esm/funcs/creditCreditRebalance.js +11 -34
  98. package/dist/esm/funcs/creditCreditRebalance.js.map +1 -1
  99. package/dist/esm/funcs/creditCreditRepay.d.ts +1 -1
  100. package/dist/esm/funcs/creditCreditRepay.js +1 -1
  101. package/dist/esm/funcs/creditCreditUnloop.d.ts +7 -38
  102. package/dist/esm/funcs/creditCreditUnloop.d.ts.map +1 -1
  103. package/dist/esm/funcs/creditCreditUnloop.js +7 -38
  104. package/dist/esm/funcs/creditCreditUnloop.js.map +1 -1
  105. package/dist/esm/lib/config.d.ts +2 -2
  106. package/dist/esm/lib/config.js +2 -2
  107. package/dist/esm/models/components/accountsummary.d.ts +18 -5
  108. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  109. package/dist/esm/models/components/accountsummary.js.map +1 -1
  110. package/dist/esm/models/components/collateralposition.d.ts +18 -5
  111. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  112. package/dist/esm/models/components/collateralposition.js.map +1 -1
  113. package/dist/esm/models/components/creditborrowparams.d.ts +18 -5
  114. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  115. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  116. package/dist/esm/models/components/creditborrowrequest.d.ts +18 -5
  117. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  118. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  119. package/dist/esm/models/components/creditenablecollateralparams.d.ts +18 -5
  120. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  121. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  122. package/dist/esm/models/components/creditlooprequest.d.ts +27 -14
  123. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  124. package/dist/esm/models/components/creditlooprequest.js +1 -1
  125. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  126. package/dist/esm/models/components/creditloopresponse.d.ts +7 -7
  127. package/dist/esm/models/components/creditloopresponse.js +3 -3
  128. package/dist/esm/models/components/creditloopresponse.js.map +1 -1
  129. package/dist/esm/models/components/creditprotocol.d.ts +36 -10
  130. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  131. package/dist/esm/models/components/creditprotocol.js +18 -5
  132. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  133. package/dist/esm/models/components/creditrepayparams.d.ts +18 -5
  134. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  135. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  136. package/dist/esm/models/components/creditrepayrequest.d.ts +18 -5
  137. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  138. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  139. package/dist/esm/models/components/creditsupplyparams.d.ts +18 -5
  140. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  141. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  142. package/dist/esm/models/components/creditunlooprequest.d.ts +23 -10
  143. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  144. package/dist/esm/models/components/creditunlooprequest.js +1 -1
  145. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  146. package/dist/esm/models/components/creditunloopresponse.d.ts +7 -7
  147. package/dist/esm/models/components/creditunloopresponse.js +3 -3
  148. package/dist/esm/models/components/creditunloopresponse.js.map +1 -1
  149. package/dist/esm/models/components/creditwithdrawparams.d.ts +18 -5
  150. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  151. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  152. package/dist/esm/models/components/debtposition.d.ts +18 -5
  153. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  154. package/dist/esm/models/components/debtposition.js.map +1 -1
  155. package/dist/esm/models/components/loopedposition.d.ts +18 -5
  156. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  157. package/dist/esm/models/components/loopedposition.js.map +1 -1
  158. package/dist/esm/models/components/rebalancetarget.d.ts +18 -5
  159. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  160. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  161. package/dist/esm/models/components/rebalancetargetpreview.d.ts +18 -5
  162. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  163. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  164. package/dist/esm/models/components/swapinfo.d.ts +2 -2
  165. package/dist/esm/sdk/credit.d.ts +44 -111
  166. package/dist/esm/sdk/credit.d.ts.map +1 -1
  167. package/dist/esm/sdk/credit.js +44 -111
  168. package/dist/esm/sdk/credit.js.map +1 -1
  169. package/docs/models/components/accountsummary.md +11 -11
  170. package/docs/models/components/collateralposition.md +17 -17
  171. package/docs/models/components/creditborrowparams.md +11 -11
  172. package/docs/models/components/creditborrowrequest.md +21 -21
  173. package/docs/models/components/creditenablecollateralparams.md +7 -7
  174. package/docs/models/components/creditlooprequest.md +19 -19
  175. package/docs/models/components/creditlooprequestchain.md +1 -1
  176. package/docs/models/components/creditlooprequestinitialcollateralamount.md +1 -1
  177. package/docs/models/components/creditlooprequestloantovalue.md +1 -1
  178. package/docs/models/components/creditloopresponse.md +9 -9
  179. package/docs/models/components/creditloopresponseswapprovider.md +3 -3
  180. package/docs/models/components/creditprotocol.md +18 -5
  181. package/docs/models/components/creditrepayparams.md +10 -10
  182. package/docs/models/components/creditrepayrequest.md +20 -20
  183. package/docs/models/components/creditsupplyparams.md +9 -9
  184. package/docs/models/components/creditunlooprequest.md +17 -17
  185. package/docs/models/components/creditunlooprequestchain.md +1 -1
  186. package/docs/models/components/creditunloopresponse.md +9 -9
  187. package/docs/models/components/creditunloopresponseswapprovider.md +3 -3
  188. package/docs/models/components/creditwithdrawparams.md +9 -9
  189. package/docs/models/components/debtposition.md +16 -16
  190. package/docs/models/components/loopedposition.md +14 -14
  191. package/docs/models/components/rebalancetarget.md +10 -10
  192. package/docs/models/components/rebalancetargetpreview.md +16 -16
  193. package/docs/models/components/swapinfo.md +10 -10
  194. package/docs/sdks/credit/README.md +40 -107
  195. package/openapi_prepped_for_speakeasy.json +32 -32
  196. package/package.json +1 -1
  197. package/src/funcs/creditCreditBorrow.ts +1 -1
  198. package/src/funcs/creditCreditLoop.ts +8 -22
  199. package/src/funcs/creditCreditLoopedPositions.ts +8 -7
  200. package/src/funcs/creditCreditRebalance.ts +11 -34
  201. package/src/funcs/creditCreditRepay.ts +1 -1
  202. package/src/funcs/creditCreditUnloop.ts +7 -38
  203. package/src/lib/config.ts +2 -2
  204. package/src/models/components/accountsummary.ts +18 -5
  205. package/src/models/components/collateralposition.ts +18 -5
  206. package/src/models/components/creditborrowparams.ts +18 -5
  207. package/src/models/components/creditborrowrequest.ts +18 -5
  208. package/src/models/components/creditenablecollateralparams.ts +18 -5
  209. package/src/models/components/creditlooprequest.ts +27 -14
  210. package/src/models/components/creditloopresponse.ts +7 -7
  211. package/src/models/components/creditprotocol.ts +36 -10
  212. package/src/models/components/creditrepayparams.ts +18 -5
  213. package/src/models/components/creditrepayrequest.ts +18 -5
  214. package/src/models/components/creditsupplyparams.ts +18 -5
  215. package/src/models/components/creditunlooprequest.ts +23 -10
  216. package/src/models/components/creditunloopresponse.ts +7 -7
  217. package/src/models/components/creditwithdrawparams.ts +18 -5
  218. package/src/models/components/debtposition.ts +18 -5
  219. package/src/models/components/loopedposition.ts +18 -5
  220. package/src/models/components/rebalancetarget.ts +18 -5
  221. package/src/models/components/rebalancetargetpreview.ts +18 -5
  222. package/src/models/components/swapinfo.ts +2 -2
  223. package/src/sdk/credit.ts +44 -111
@@ -30,17 +30,17 @@ let value: LoopedPosition = {
30
30
 
31
31
  ## Fields
32
32
 
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. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
36
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market. | |
37
- | `collateralToken` | *string* | :heavy_check_mark: | Address of the collateral token. | |
38
- | `collateralSymbol` | *string* | :heavy_check_mark: | Symbol of the collateral token. | |
39
- | `debtToken` | *string* | :heavy_check_mark: | Address of the debt token. | |
40
- | `debtSymbol` | *string* | :heavy_check_mark: | Symbol of the debt token. | |
41
- | `status` | [components.LoopedPositionStatus](../../models/components/loopedpositionstatus.md) | :heavy_check_mark: | Whether the position is currently open or fully closed. | |
42
- | `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. | |
43
- | `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. | |
44
- | `current` | [components.LoopedPositionCurrentState](../../models/components/loopedpositioncurrentstate.md) | :heavy_minus_sign: | Live on-chain state; null for CLOSED positions. | |
45
- | `totals` | [components.LoopedPositionTotals](../../models/components/loopedpositiontotals.md) | :heavy_check_mark: | Lifetime totals across all of a looped position's transactions. | |
46
- | `history` | [components.LoopedPositionHistoryEntry](../../models/components/loopedpositionhistoryentry.md)[] | :heavy_minus_sign: | All transactions for this position, chronological. | [] |
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`` and ``/v2/credit/unloop``. EULER does<br/>NOT: ``/v2/credit/rebalance`` rejects it with a 422, and<br/>``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is<br/>silently absent there rather than an error, so read it from<br/>``/v2/credit/positions`` instead. (EULER still appears in the<br/>``looped_positions`` response enum because this enum is shared; it is never<br/>emitted.) | |
36
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market. | |
37
+ | `collateralToken` | *string* | :heavy_check_mark: | Address of the collateral token. | |
38
+ | `collateralSymbol` | *string* | :heavy_check_mark: | Symbol of the collateral token. | |
39
+ | `debtToken` | *string* | :heavy_check_mark: | Address of the debt token. | |
40
+ | `debtSymbol` | *string* | :heavy_check_mark: | Symbol of the debt token. | |
41
+ | `status` | [components.LoopedPositionStatus](../../models/components/loopedpositionstatus.md) | :heavy_check_mark: | Whether the position is currently open or fully closed. | |
42
+ | `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. | |
43
+ | `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. | |
44
+ | `current` | [components.LoopedPositionCurrentState](../../models/components/loopedpositioncurrentstate.md) | :heavy_minus_sign: | Live on-chain state; null for CLOSED positions. | |
45
+ | `totals` | [components.LoopedPositionTotals](../../models/components/loopedpositiontotals.md) | :heavy_check_mark: | Lifetime totals across all of a looped position's transactions. | |
46
+ | `history` | [components.LoopedPositionHistoryEntry](../../models/components/loopedpositionhistoryentry.md)[] | :heavy_minus_sign: | All transactions for this position, chronological. | [] |
@@ -20,13 +20,13 @@ let value: RebalanceTarget = {
20
20
 
21
21
  ## Fields
22
22
 
23
- | Field | Type | Required | Description | Example |
24
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
- | `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. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
26
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
27
- | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral for this position. For MORPHO it must be the market's collateral token. | |
28
- | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed against the collateral for this position. For MORPHO it must be the market's loan token. | |
29
- | `targetEquityUsd` | *components.TargetEquityUsd* | :heavy_minus_sign: | SIZE knob: the net value (collateral − debt, in USD) to commit to this position; total collateral ≈ target_equity_usd × target_multiplier. To remove a position use close=true, never target_equity_usd=0. | |
30
- | `targetMultiplier` | *components.RebalanceTargetTargetMultiplier* | :heavy_minus_sign: | LEVERAGE knob: total collateral exposure ÷ equity. 1 means unlevered supplied collateral. The protocol maximum is enforced when the plan is built. | |
31
- | `close` | *boolean* | :heavy_minus_sign: | If true, fully unwind this position: the debt is cleared exactly (accrued interest included) and the pair collateral is returned to the Credit Account. | false |
32
- | `maxSlippagePercent` | *components.RebalanceTargetMaxSlippagePercent* | :heavy_minus_sign: | Per-target override of the request-level per-swap slippage tolerance in percent. | |
23
+ | Field | Type | Required | Description | Example |
24
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
25
+ | `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`` and ``/v2/credit/unloop``. EULER does<br/>NOT: ``/v2/credit/rebalance`` rejects it with a 422, and<br/>``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is<br/>silently absent there rather than an error, so read it from<br/>``/v2/credit/positions`` instead. (EULER still appears in the<br/>``looped_positions`` response enum because this enum is shared; it is never<br/>emitted.) | |
26
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
27
+ | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral for this position. For MORPHO it must be the market's collateral token. | |
28
+ | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed against the collateral for this position. For MORPHO it must be the market's loan token. | |
29
+ | `targetEquityUsd` | *components.TargetEquityUsd* | :heavy_minus_sign: | SIZE knob: the net value (collateral − debt, in USD) to commit to this position; total collateral ≈ target_equity_usd × target_multiplier. To remove a position use close=true, never target_equity_usd=0. | |
30
+ | `targetMultiplier` | *components.RebalanceTargetTargetMultiplier* | :heavy_minus_sign: | LEVERAGE knob: total collateral exposure ÷ equity. 1 means unlevered supplied collateral. The protocol maximum is enforced when the plan is built. | |
31
+ | `close` | *boolean* | :heavy_minus_sign: | If true, fully unwind this position: the debt is cleared exactly (accrued interest included) and the pair collateral is returned to the Credit Account. | false |
32
+ | `maxSlippagePercent` | *components.RebalanceTargetMaxSlippagePercent* | :heavy_minus_sign: | Per-target override of the request-level per-swap slippage tolerance in percent. | |