@compass-labs/api-sdk 2.2.76 → 2.2.77-rc.1

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 (403) hide show
  1. package/README.md +9 -3
  2. package/codeSamples_typescript.yaml +18 -0
  3. package/dist/commonjs/funcs/creditCreditLoop.d.ts +31 -0
  4. package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/creditCreditLoop.js +132 -0
  6. package/dist/commonjs/funcs/creditCreditLoop.js.map +1 -0
  7. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts +26 -0
  8. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/creditCreditLoopedPositions.js +131 -0
  10. package/dist/commonjs/funcs/creditCreditLoopedPositions.js.map +1 -0
  11. package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts +24 -0
  12. package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/creditCreditMorphoMarkets.js +128 -0
  14. package/dist/commonjs/funcs/creditCreditMorphoMarkets.js.map +1 -0
  15. package/dist/commonjs/lib/config.d.ts +2 -2
  16. package/dist/commonjs/lib/config.js +2 -2
  17. package/dist/commonjs/models/components/aavelooprequest.d.ts +16 -16
  18. package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/aavelooprequest.js +17 -17
  20. package/dist/commonjs/models/components/aavelooprequest.js.map +1 -1
  21. package/dist/commonjs/models/components/accountsummary.d.ts +4 -0
  22. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  23. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  24. package/dist/commonjs/models/components/collateralposition.d.ts +12 -0
  25. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/collateralposition.js +4 -0
  27. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  28. package/dist/commonjs/models/components/createaccountrequest.d.ts +1 -0
  29. package/dist/commonjs/models/components/createaccountrequest.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/createaccountrequest.js +1 -0
  31. package/dist/commonjs/models/components/createaccountrequest.js.map +1 -1
  32. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts +1 -0
  33. package/dist/commonjs/models/components/createcreditaccountrequest.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/createcreditaccountrequest.js +1 -0
  35. package/dist/commonjs/models/components/createcreditaccountrequest.js.map +1 -1
  36. package/dist/commonjs/models/components/creditborrowparams.d.ts +9 -0
  37. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  38. package/dist/commonjs/models/components/creditborrowparams.js +2 -0
  39. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  40. package/dist/commonjs/models/components/creditborrowrequest.d.ts +9 -0
  41. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  42. package/dist/commonjs/models/components/creditborrowrequest.js +2 -0
  43. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  44. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +4 -0
  45. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  46. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  47. package/dist/commonjs/models/components/creditloopedpositionsresponse.d.ts +26 -0
  48. package/dist/commonjs/models/components/creditloopedpositionsresponse.d.ts.map +1 -0
  49. package/dist/commonjs/models/components/creditloopedpositionsresponse.js +60 -0
  50. package/dist/commonjs/models/components/creditloopedpositionsresponse.js.map +1 -0
  51. package/dist/commonjs/models/components/creditlooppreview.d.ts +45 -0
  52. package/dist/commonjs/models/components/creditlooppreview.d.ts.map +1 -0
  53. package/dist/commonjs/models/components/creditlooppreview.js +68 -0
  54. package/dist/commonjs/models/components/creditlooppreview.js.map +1 -0
  55. package/dist/commonjs/models/components/creditlooprequest.d.ts +125 -0
  56. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -0
  57. package/dist/commonjs/models/components/creditlooprequest.js +98 -0
  58. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -0
  59. package/dist/commonjs/models/components/creditloopresponse.d.ts +27 -0
  60. package/dist/commonjs/models/components/creditloopresponse.d.ts.map +1 -0
  61. package/dist/commonjs/models/components/creditloopresponse.js +61 -0
  62. package/dist/commonjs/models/components/creditloopresponse.js.map +1 -0
  63. package/dist/commonjs/models/components/creditprotocol.d.ts +9 -0
  64. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/creditprotocol.js +5 -0
  66. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  67. package/dist/commonjs/models/components/creditrepayparams.d.ts +9 -0
  68. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/creditrepayparams.js +2 -0
  70. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  71. package/dist/commonjs/models/components/creditrepayrequest.d.ts +9 -0
  72. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/creditrepayrequest.js +2 -0
  74. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  75. package/dist/commonjs/models/components/creditsupplyparams.d.ts +9 -0
  76. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/creditsupplyparams.js +2 -0
  78. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  79. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +9 -0
  80. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/creditwithdrawparams.js +2 -0
  82. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  83. package/dist/commonjs/models/components/debtposition.d.ts +12 -0
  84. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  85. package/dist/commonjs/models/components/debtposition.js +4 -0
  86. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  87. package/dist/commonjs/models/components/index.d.ts +12 -0
  88. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  89. package/dist/commonjs/models/components/index.js +12 -0
  90. package/dist/commonjs/models/components/index.js.map +1 -1
  91. package/dist/commonjs/models/components/loopedposition.d.ts +88 -0
  92. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -0
  93. package/dist/commonjs/models/components/loopedposition.js +85 -0
  94. package/dist/commonjs/models/components/loopedposition.js.map +1 -0
  95. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +58 -0
  96. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts.map +1 -0
  97. package/dist/commonjs/models/components/loopedpositioncurrentstate.js +77 -0
  98. package/dist/commonjs/models/components/loopedpositioncurrentstate.js.map +1 -0
  99. package/dist/commonjs/models/components/loopedpositionhistoryentry.d.ts +71 -0
  100. package/dist/commonjs/models/components/loopedpositionhistoryentry.d.ts.map +1 -0
  101. package/dist/commonjs/models/components/loopedpositionhistoryentry.js +85 -0
  102. package/dist/commonjs/models/components/loopedpositionhistoryentry.js.map +1 -0
  103. package/dist/commonjs/models/components/loopedpositiontotals.d.ts +40 -0
  104. package/dist/commonjs/models/components/loopedpositiontotals.d.ts.map +1 -0
  105. package/dist/commonjs/models/components/loopedpositiontotals.js +67 -0
  106. package/dist/commonjs/models/components/loopedpositiontotals.js.map +1 -0
  107. package/dist/commonjs/models/components/looplegpreview.d.ts +24 -0
  108. package/dist/commonjs/models/components/looplegpreview.d.ts.map +1 -0
  109. package/dist/commonjs/models/components/looplegpreview.js +59 -0
  110. package/dist/commonjs/models/components/looplegpreview.js.map +1 -0
  111. package/dist/commonjs/models/components/morpholendingmarket.d.ts +80 -0
  112. package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +1 -0
  113. package/dist/commonjs/models/components/morpholendingmarket.js +82 -0
  114. package/dist/commonjs/models/components/morpholendingmarket.js.map +1 -0
  115. package/dist/commonjs/models/components/morphomarketsresponse.d.ts +21 -0
  116. package/dist/commonjs/models/components/morphomarketsresponse.d.ts.map +1 -0
  117. package/dist/commonjs/models/components/morphomarketsresponse.js +52 -0
  118. package/dist/commonjs/models/components/morphomarketsresponse.js.map +1 -0
  119. package/dist/commonjs/models/components/swapinfo.d.ts +48 -0
  120. package/dist/commonjs/models/components/swapinfo.d.ts.map +1 -0
  121. package/dist/commonjs/models/components/swapinfo.js +66 -0
  122. package/dist/commonjs/models/components/swapinfo.js.map +1 -0
  123. package/dist/commonjs/models/operations/index.d.ts +2 -0
  124. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  125. package/dist/commonjs/models/operations/index.js +2 -0
  126. package/dist/commonjs/models/operations/index.js.map +1 -1
  127. package/dist/commonjs/models/operations/v2creditbalances.d.ts +1 -0
  128. package/dist/commonjs/models/operations/v2creditbalances.d.ts.map +1 -1
  129. package/dist/commonjs/models/operations/v2creditbalances.js +1 -0
  130. package/dist/commonjs/models/operations/v2creditbalances.js.map +1 -1
  131. package/dist/commonjs/models/operations/v2crediteulermarkets.d.ts +1 -0
  132. package/dist/commonjs/models/operations/v2crediteulermarkets.d.ts.map +1 -1
  133. package/dist/commonjs/models/operations/v2crediteulermarkets.js +1 -0
  134. package/dist/commonjs/models/operations/v2crediteulermarkets.js.map +1 -1
  135. package/dist/commonjs/models/operations/v2creditloopedpositions.d.ts +28 -0
  136. package/dist/commonjs/models/operations/v2creditloopedpositions.d.ts.map +1 -0
  137. package/dist/commonjs/models/operations/v2creditloopedpositions.js +59 -0
  138. package/dist/commonjs/models/operations/v2creditloopedpositions.js.map +1 -0
  139. package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts +23 -0
  140. package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts.map +1 -0
  141. package/dist/commonjs/models/operations/v2creditmorphomarkets.js +58 -0
  142. package/dist/commonjs/models/operations/v2creditmorphomarkets.js.map +1 -0
  143. package/dist/commonjs/models/operations/v2creditpositions.d.ts +1 -0
  144. package/dist/commonjs/models/operations/v2creditpositions.d.ts.map +1 -1
  145. package/dist/commonjs/models/operations/v2creditpositions.js +1 -0
  146. package/dist/commonjs/models/operations/v2creditpositions.js.map +1 -1
  147. package/dist/commonjs/models/operations/v2earnbalances.d.ts +1 -0
  148. package/dist/commonjs/models/operations/v2earnbalances.d.ts.map +1 -1
  149. package/dist/commonjs/models/operations/v2earnbalances.js +1 -0
  150. package/dist/commonjs/models/operations/v2earnbalances.js.map +1 -1
  151. package/dist/commonjs/models/operations/v2earnpositions.d.ts +1 -0
  152. package/dist/commonjs/models/operations/v2earnpositions.d.ts.map +1 -1
  153. package/dist/commonjs/models/operations/v2earnpositions.js +1 -0
  154. package/dist/commonjs/models/operations/v2earnpositions.js.map +1 -1
  155. package/dist/commonjs/sdk/credit.d.ts +46 -0
  156. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  157. package/dist/commonjs/sdk/credit.js +55 -0
  158. package/dist/commonjs/sdk/credit.js.map +1 -1
  159. package/dist/esm/funcs/creditCreditLoop.d.ts +31 -0
  160. package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -0
  161. package/dist/esm/funcs/creditCreditLoop.js +96 -0
  162. package/dist/esm/funcs/creditCreditLoop.js.map +1 -0
  163. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +26 -0
  164. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -0
  165. package/dist/esm/funcs/creditCreditLoopedPositions.js +95 -0
  166. package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -0
  167. package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts +24 -0
  168. package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts.map +1 -0
  169. package/dist/esm/funcs/creditCreditMorphoMarkets.js +92 -0
  170. package/dist/esm/funcs/creditCreditMorphoMarkets.js.map +1 -0
  171. package/dist/esm/lib/config.d.ts +2 -2
  172. package/dist/esm/lib/config.js +2 -2
  173. package/dist/esm/models/components/aavelooprequest.d.ts +16 -16
  174. package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -1
  175. package/dist/esm/models/components/aavelooprequest.js +12 -12
  176. package/dist/esm/models/components/aavelooprequest.js.map +1 -1
  177. package/dist/esm/models/components/accountsummary.d.ts +4 -0
  178. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  179. package/dist/esm/models/components/accountsummary.js.map +1 -1
  180. package/dist/esm/models/components/collateralposition.d.ts +12 -0
  181. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  182. package/dist/esm/models/components/collateralposition.js +4 -0
  183. package/dist/esm/models/components/collateralposition.js.map +1 -1
  184. package/dist/esm/models/components/createaccountrequest.d.ts +1 -0
  185. package/dist/esm/models/components/createaccountrequest.d.ts.map +1 -1
  186. package/dist/esm/models/components/createaccountrequest.js +1 -0
  187. package/dist/esm/models/components/createaccountrequest.js.map +1 -1
  188. package/dist/esm/models/components/createcreditaccountrequest.d.ts +1 -0
  189. package/dist/esm/models/components/createcreditaccountrequest.d.ts.map +1 -1
  190. package/dist/esm/models/components/createcreditaccountrequest.js +1 -0
  191. package/dist/esm/models/components/createcreditaccountrequest.js.map +1 -1
  192. package/dist/esm/models/components/creditborrowparams.d.ts +9 -0
  193. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  194. package/dist/esm/models/components/creditborrowparams.js +2 -0
  195. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  196. package/dist/esm/models/components/creditborrowrequest.d.ts +9 -0
  197. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  198. package/dist/esm/models/components/creditborrowrequest.js +2 -0
  199. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  200. package/dist/esm/models/components/creditenablecollateralparams.d.ts +4 -0
  201. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  202. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  203. package/dist/esm/models/components/creditloopedpositionsresponse.d.ts +26 -0
  204. package/dist/esm/models/components/creditloopedpositionsresponse.d.ts.map +1 -0
  205. package/dist/esm/models/components/creditloopedpositionsresponse.js +23 -0
  206. package/dist/esm/models/components/creditloopedpositionsresponse.js.map +1 -0
  207. package/dist/esm/models/components/creditlooppreview.d.ts +45 -0
  208. package/dist/esm/models/components/creditlooppreview.d.ts.map +1 -0
  209. package/dist/esm/models/components/creditlooppreview.js +31 -0
  210. package/dist/esm/models/components/creditlooppreview.js.map +1 -0
  211. package/dist/esm/models/components/creditlooprequest.d.ts +125 -0
  212. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -0
  213. package/dist/esm/models/components/creditlooprequest.js +57 -0
  214. package/dist/esm/models/components/creditlooprequest.js.map +1 -0
  215. package/dist/esm/models/components/creditloopresponse.d.ts +27 -0
  216. package/dist/esm/models/components/creditloopresponse.d.ts.map +1 -0
  217. package/dist/esm/models/components/creditloopresponse.js +24 -0
  218. package/dist/esm/models/components/creditloopresponse.js.map +1 -0
  219. package/dist/esm/models/components/creditprotocol.d.ts +9 -0
  220. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  221. package/dist/esm/models/components/creditprotocol.js +5 -0
  222. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  223. package/dist/esm/models/components/creditrepayparams.d.ts +9 -0
  224. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  225. package/dist/esm/models/components/creditrepayparams.js +2 -0
  226. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  227. package/dist/esm/models/components/creditrepayrequest.d.ts +9 -0
  228. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  229. package/dist/esm/models/components/creditrepayrequest.js +2 -0
  230. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  231. package/dist/esm/models/components/creditsupplyparams.d.ts +9 -0
  232. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  233. package/dist/esm/models/components/creditsupplyparams.js +2 -0
  234. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  235. package/dist/esm/models/components/creditwithdrawparams.d.ts +9 -0
  236. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  237. package/dist/esm/models/components/creditwithdrawparams.js +2 -0
  238. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  239. package/dist/esm/models/components/debtposition.d.ts +12 -0
  240. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  241. package/dist/esm/models/components/debtposition.js +4 -0
  242. package/dist/esm/models/components/debtposition.js.map +1 -1
  243. package/dist/esm/models/components/index.d.ts +12 -0
  244. package/dist/esm/models/components/index.d.ts.map +1 -1
  245. package/dist/esm/models/components/index.js +12 -0
  246. package/dist/esm/models/components/index.js.map +1 -1
  247. package/dist/esm/models/components/loopedposition.d.ts +88 -0
  248. package/dist/esm/models/components/loopedposition.d.ts.map +1 -0
  249. package/dist/esm/models/components/loopedposition.js +48 -0
  250. package/dist/esm/models/components/loopedposition.js.map +1 -0
  251. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +58 -0
  252. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts.map +1 -0
  253. package/dist/esm/models/components/loopedpositioncurrentstate.js +40 -0
  254. package/dist/esm/models/components/loopedpositioncurrentstate.js.map +1 -0
  255. package/dist/esm/models/components/loopedpositionhistoryentry.d.ts +71 -0
  256. package/dist/esm/models/components/loopedpositionhistoryentry.d.ts.map +1 -0
  257. package/dist/esm/models/components/loopedpositionhistoryentry.js +48 -0
  258. package/dist/esm/models/components/loopedpositionhistoryentry.js.map +1 -0
  259. package/dist/esm/models/components/loopedpositiontotals.d.ts +40 -0
  260. package/dist/esm/models/components/loopedpositiontotals.d.ts.map +1 -0
  261. package/dist/esm/models/components/loopedpositiontotals.js +30 -0
  262. package/dist/esm/models/components/loopedpositiontotals.js.map +1 -0
  263. package/dist/esm/models/components/looplegpreview.d.ts +24 -0
  264. package/dist/esm/models/components/looplegpreview.d.ts.map +1 -0
  265. package/dist/esm/models/components/looplegpreview.js +22 -0
  266. package/dist/esm/models/components/looplegpreview.js.map +1 -0
  267. package/dist/esm/models/components/morpholendingmarket.d.ts +80 -0
  268. package/dist/esm/models/components/morpholendingmarket.d.ts.map +1 -0
  269. package/dist/esm/models/components/morpholendingmarket.js +45 -0
  270. package/dist/esm/models/components/morpholendingmarket.js.map +1 -0
  271. package/dist/esm/models/components/morphomarketsresponse.d.ts +21 -0
  272. package/dist/esm/models/components/morphomarketsresponse.d.ts.map +1 -0
  273. package/dist/esm/models/components/morphomarketsresponse.js +15 -0
  274. package/dist/esm/models/components/morphomarketsresponse.js.map +1 -0
  275. package/dist/esm/models/components/swapinfo.d.ts +48 -0
  276. package/dist/esm/models/components/swapinfo.d.ts.map +1 -0
  277. package/dist/esm/models/components/swapinfo.js +29 -0
  278. package/dist/esm/models/components/swapinfo.js.map +1 -0
  279. package/dist/esm/models/operations/index.d.ts +2 -0
  280. package/dist/esm/models/operations/index.d.ts.map +1 -1
  281. package/dist/esm/models/operations/index.js +2 -0
  282. package/dist/esm/models/operations/index.js.map +1 -1
  283. package/dist/esm/models/operations/v2creditbalances.d.ts +1 -0
  284. package/dist/esm/models/operations/v2creditbalances.d.ts.map +1 -1
  285. package/dist/esm/models/operations/v2creditbalances.js +1 -0
  286. package/dist/esm/models/operations/v2creditbalances.js.map +1 -1
  287. package/dist/esm/models/operations/v2crediteulermarkets.d.ts +1 -0
  288. package/dist/esm/models/operations/v2crediteulermarkets.d.ts.map +1 -1
  289. package/dist/esm/models/operations/v2crediteulermarkets.js +1 -0
  290. package/dist/esm/models/operations/v2crediteulermarkets.js.map +1 -1
  291. package/dist/esm/models/operations/v2creditloopedpositions.d.ts +28 -0
  292. package/dist/esm/models/operations/v2creditloopedpositions.d.ts.map +1 -0
  293. package/dist/esm/models/operations/v2creditloopedpositions.js +22 -0
  294. package/dist/esm/models/operations/v2creditloopedpositions.js.map +1 -0
  295. package/dist/esm/models/operations/v2creditmorphomarkets.d.ts +23 -0
  296. package/dist/esm/models/operations/v2creditmorphomarkets.d.ts.map +1 -0
  297. package/dist/esm/models/operations/v2creditmorphomarkets.js +21 -0
  298. package/dist/esm/models/operations/v2creditmorphomarkets.js.map +1 -0
  299. package/dist/esm/models/operations/v2creditpositions.d.ts +1 -0
  300. package/dist/esm/models/operations/v2creditpositions.d.ts.map +1 -1
  301. package/dist/esm/models/operations/v2creditpositions.js +1 -0
  302. package/dist/esm/models/operations/v2creditpositions.js.map +1 -1
  303. package/dist/esm/models/operations/v2earnbalances.d.ts +1 -0
  304. package/dist/esm/models/operations/v2earnbalances.d.ts.map +1 -1
  305. package/dist/esm/models/operations/v2earnbalances.js +1 -0
  306. package/dist/esm/models/operations/v2earnbalances.js.map +1 -1
  307. package/dist/esm/models/operations/v2earnpositions.d.ts +1 -0
  308. package/dist/esm/models/operations/v2earnpositions.d.ts.map +1 -1
  309. package/dist/esm/models/operations/v2earnpositions.js +1 -0
  310. package/dist/esm/models/operations/v2earnpositions.js.map +1 -1
  311. package/dist/esm/sdk/credit.d.ts +46 -0
  312. package/dist/esm/sdk/credit.d.ts.map +1 -1
  313. package/dist/esm/sdk/credit.js +55 -0
  314. package/dist/esm/sdk/credit.js.map +1 -1
  315. package/docs/models/components/aavelooprequest.md +4 -4
  316. package/docs/models/components/{initialcollateralamount.md → aavelooprequestinitialcollateralamount.md} +1 -1
  317. package/docs/models/components/{loantovalue.md → aavelooprequestloantovalue.md} +1 -1
  318. package/docs/models/components/{maxslippagepercent.md → aavelooprequestmaxslippagepercent.md} +1 -1
  319. package/docs/models/components/{multiplier.md → aavelooprequestmultiplier.md} +1 -1
  320. package/docs/models/components/accountsummary.md +10 -10
  321. package/docs/models/components/classification.md +17 -0
  322. package/docs/models/components/collateralposition.md +16 -14
  323. package/docs/models/components/createaccountrequestchain.md +1 -1
  324. package/docs/models/components/createcreditaccountrequestchain.md +1 -1
  325. package/docs/models/components/creditborrowparams.md +10 -9
  326. package/docs/models/components/creditborrowrequest.md +20 -19
  327. package/docs/models/components/creditenablecollateralparams.md +6 -6
  328. package/docs/models/components/creditloopedpositionsresponse.md +30 -0
  329. package/docs/models/components/creditlooppreview.md +33 -0
  330. package/docs/models/components/creditlooprequest.md +41 -0
  331. package/docs/models/components/creditlooprequestinitialcollateralamount.md +19 -0
  332. package/docs/models/components/creditlooprequestloantovalue.md +19 -0
  333. package/docs/models/components/creditlooprequestmaxslippagepercent.md +19 -0
  334. package/docs/models/components/creditlooprequestmultiplier.md +19 -0
  335. package/docs/models/components/creditloopresponse.md +30 -0
  336. package/docs/models/components/creditprotocol.md +5 -1
  337. package/docs/models/components/creditrepayparams.md +9 -8
  338. package/docs/models/components/creditrepayrequest.md +19 -18
  339. package/docs/models/components/creditsupplyparams.md +8 -7
  340. package/docs/models/components/creditwithdrawparams.md +8 -7
  341. package/docs/models/components/debtposition.md +15 -13
  342. package/docs/models/components/healthfactorscope.md +17 -0
  343. package/docs/models/components/loopedposition.md +46 -0
  344. package/docs/models/components/loopedpositioncurrentstate.md +28 -0
  345. package/docs/models/components/loopedpositionhistoryentry.md +33 -0
  346. package/docs/models/components/loopedpositionstatus.md +17 -0
  347. package/docs/models/components/loopedpositiontotals.md +31 -0
  348. package/docs/models/components/looplegpreview.md +21 -0
  349. package/docs/models/components/morpholendingmarket.md +49 -0
  350. package/docs/models/components/morphomarketsresponse.md +21 -0
  351. package/docs/models/components/swapinfo.md +36 -0
  352. package/docs/models/operations/v2creditbalanceschain.md +1 -1
  353. package/docs/models/operations/v2crediteulermarketschain.md +1 -1
  354. package/docs/models/operations/v2creditloopedpositionschain.md +15 -0
  355. package/docs/models/operations/v2creditloopedpositionsrequest.md +19 -0
  356. package/docs/models/operations/v2creditmorphomarketschain.md +15 -0
  357. package/docs/models/operations/v2creditmorphomarketsrequest.md +17 -0
  358. package/docs/models/operations/v2creditpositionschain.md +1 -1
  359. package/docs/models/operations/v2earnbalanceschain.md +1 -1
  360. package/docs/models/operations/v2earnpositionschain.md +1 -1
  361. package/docs/sdks/credit/README.md +270 -0
  362. package/openapi_prepped_for_speakeasy.json +1331 -157
  363. package/package.json +1 -1
  364. package/src/funcs/creditCreditLoop.ts +184 -0
  365. package/src/funcs/creditCreditLoopedPositions.ts +185 -0
  366. package/src/funcs/creditCreditMorphoMarkets.ts +182 -0
  367. package/src/lib/config.ts +2 -2
  368. package/src/models/components/aavelooprequest.ts +43 -30
  369. package/src/models/components/accountsummary.ts +4 -0
  370. package/src/models/components/collateralposition.ts +16 -0
  371. package/src/models/components/createaccountrequest.ts +1 -0
  372. package/src/models/components/createcreditaccountrequest.ts +1 -0
  373. package/src/models/components/creditborrowparams.ts +11 -0
  374. package/src/models/components/creditborrowrequest.ts +11 -0
  375. package/src/models/components/creditenablecollateralparams.ts +4 -0
  376. package/src/models/components/creditloopedpositionsresponse.ts +61 -0
  377. package/src/models/components/creditlooppreview.ts +86 -0
  378. package/src/models/components/creditlooprequest.ts +235 -0
  379. package/src/models/components/creditloopresponse.ts +65 -0
  380. package/src/models/components/creditprotocol.ts +9 -0
  381. package/src/models/components/creditrepayparams.ts +11 -0
  382. package/src/models/components/creditrepayrequest.ts +11 -0
  383. package/src/models/components/creditsupplyparams.ts +11 -0
  384. package/src/models/components/creditwithdrawparams.ts +11 -0
  385. package/src/models/components/debtposition.ts +16 -0
  386. package/src/models/components/index.ts +12 -0
  387. package/src/models/components/loopedposition.ts +149 -0
  388. package/src/models/components/loopedpositioncurrentstate.ts +101 -0
  389. package/src/models/components/loopedpositionhistoryentry.ts +115 -0
  390. package/src/models/components/loopedpositiontotals.ts +78 -0
  391. package/src/models/components/looplegpreview.ts +54 -0
  392. package/src/models/components/morpholendingmarket.ts +133 -0
  393. package/src/models/components/morphomarketsresponse.ts +46 -0
  394. package/src/models/components/swapinfo.ts +85 -0
  395. package/src/models/operations/index.ts +2 -0
  396. package/src/models/operations/v2creditbalances.ts +1 -0
  397. package/src/models/operations/v2crediteulermarkets.ts +1 -0
  398. package/src/models/operations/v2creditloopedpositions.ts +56 -0
  399. package/src/models/operations/v2creditmorphomarkets.ts +50 -0
  400. package/src/models/operations/v2creditpositions.ts +1 -0
  401. package/src/models/operations/v2earnbalances.ts +1 -0
  402. package/src/models/operations/v2earnpositions.ts +1 -0
  403. package/src/sdk/credit.ts +79 -0
@@ -4871,6 +4871,7 @@
4871
4871
  "enum": [
4872
4872
  "arbitrum",
4873
4873
  "base",
4874
+ "bsc",
4874
4875
  "ethereum",
4875
4876
  "tempo"
4876
4877
  ],
@@ -5503,6 +5504,7 @@
5503
5504
  "enum": [
5504
5505
  "arbitrum",
5505
5506
  "base",
5507
+ "bsc",
5506
5508
  "ethereum",
5507
5509
  "tempo"
5508
5510
  ],
@@ -5901,6 +5903,7 @@
5901
5903
  "enum": [
5902
5904
  "arbitrum",
5903
5905
  "base",
5906
+ "bsc",
5904
5907
  "ethereum",
5905
5908
  "tempo"
5906
5909
  ],
@@ -5963,6 +5966,7 @@
5963
5966
  "enum": [
5964
5967
  "arbitrum",
5965
5968
  "base",
5969
+ "bsc",
5966
5970
  "ethereum",
5967
5971
  "tempo"
5968
5972
  ],
@@ -6007,6 +6011,69 @@
6007
6011
  "x-speakeasy-name-override": "credit_balances"
6008
6012
  }
6009
6013
  },
6014
+ "/v2/credit/looped_positions": {
6015
+ "get": {
6016
+ "tags": [
6017
+ "Credit"
6018
+ ],
6019
+ "summary": "List looped (leveraged) credit positions",
6020
+ "description": "List looped (leveraged) positions for a credit account owner.\n\nDetects loops from the account's on-chain history: a transaction containing\nlending + borrowing + swap legs is a loop transaction. Returns one position\nper Morpho market / Aave collateral+debt reserve pair, each with its complete\nper-transaction history, lifetime totals, and live on-chain state (health\nfactor, USD values, leverage) for open positions. Covers Aave V3 and Morpho\nBlue.",
6021
+ "operationId": "v2_credit_looped_positions",
6022
+ "parameters": [
6023
+ {
6024
+ "name": "chain",
6025
+ "in": "query",
6026
+ "required": true,
6027
+ "schema": {
6028
+ "type": "string",
6029
+ "enum": [
6030
+ "arbitrum",
6031
+ "base",
6032
+ "bsc",
6033
+ "ethereum",
6034
+ "tempo"
6035
+ ],
6036
+ "title": "Chain",
6037
+ "example": "base"
6038
+ }
6039
+ },
6040
+ {
6041
+ "name": "owner",
6042
+ "in": "query",
6043
+ "required": true,
6044
+ "schema": {
6045
+ "type": "string",
6046
+ "title": "Owner",
6047
+ "example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
6048
+ },
6049
+ "description": "The address of the owner of the credit account to get looped positions for."
6050
+ }
6051
+ ],
6052
+ "responses": {
6053
+ "200": {
6054
+ "description": "Successful Response",
6055
+ "content": {
6056
+ "application/json": {
6057
+ "schema": {
6058
+ "$ref": "#/components/schemas/CreditLoopedPositionsResponse"
6059
+ }
6060
+ }
6061
+ }
6062
+ },
6063
+ "422": {
6064
+ "description": "Validation Error",
6065
+ "content": {
6066
+ "application/json": {
6067
+ "schema": {
6068
+ "$ref": "#/components/schemas/HTTPValidationError"
6069
+ }
6070
+ }
6071
+ }
6072
+ }
6073
+ },
6074
+ "x-speakeasy-name-override": "credit_looped_positions"
6075
+ }
6076
+ },
6010
6077
  "/v2/credit/euler_markets": {
6011
6078
  "get": {
6012
6079
  "tags": [
@@ -6025,6 +6092,7 @@
6025
6092
  "enum": [
6026
6093
  "arbitrum",
6027
6094
  "base",
6095
+ "bsc",
6028
6096
  "ethereum",
6029
6097
  "tempo"
6030
6098
  ],
@@ -6058,6 +6126,58 @@
6058
6126
  "x-speakeasy-name-override": "credit_euler_markets"
6059
6127
  }
6060
6128
  },
6129
+ "/v2/credit/morpho_markets": {
6130
+ "get": {
6131
+ "tags": [
6132
+ "Credit"
6133
+ ],
6134
+ "summary": "List curated Morpho markets",
6135
+ "description": "List curated Morpho Blue lending markets for a chain.\n\nMorpho Blue is permissionless, so credit actions identify a market by its\nbytes32 market id. This returns the curated market set with live LLTV,\nsupply/borrow APY, utilization, and available liquidity -- read on-chain per\nrequest -- so callers know which market_id to use and what it currently costs.",
6136
+ "operationId": "v2_credit_morpho_markets",
6137
+ "parameters": [
6138
+ {
6139
+ "name": "chain",
6140
+ "in": "query",
6141
+ "required": true,
6142
+ "schema": {
6143
+ "type": "string",
6144
+ "enum": [
6145
+ "arbitrum",
6146
+ "base",
6147
+ "bsc",
6148
+ "ethereum",
6149
+ "tempo"
6150
+ ],
6151
+ "title": "Chain",
6152
+ "example": "ethereum"
6153
+ }
6154
+ }
6155
+ ],
6156
+ "responses": {
6157
+ "200": {
6158
+ "description": "Successful Response",
6159
+ "content": {
6160
+ "application/json": {
6161
+ "schema": {
6162
+ "$ref": "#/components/schemas/MorphoMarketsResponse"
6163
+ }
6164
+ }
6165
+ }
6166
+ },
6167
+ "422": {
6168
+ "description": "Validation Error",
6169
+ "content": {
6170
+ "application/json": {
6171
+ "schema": {
6172
+ "$ref": "#/components/schemas/HTTPValidationError"
6173
+ }
6174
+ }
6175
+ }
6176
+ }
6177
+ },
6178
+ "x-speakeasy-name-override": "credit_morpho_markets"
6179
+ }
6180
+ },
6061
6181
  "/v2/credit/create_account": {
6062
6182
  "post": {
6063
6183
  "tags": [
@@ -6144,6 +6264,49 @@
6144
6264
  "x-speakeasy-name-override": "credit_borrow"
6145
6265
  }
6146
6266
  },
6267
+ "/v2/credit/loop": {
6268
+ "post": {
6269
+ "tags": [
6270
+ "Credit"
6271
+ ],
6272
+ "summary": "Open a leveraged loop",
6273
+ "description": "Open a leveraged loop into an Aave or Morpho market in ONE atomic transaction.\n\nRepeatedly supplies collateral, borrows at the requested loan-to-value, and\nswaps the borrow back to collateral. Each iteration's supply uses the swap's\nGUARANTEED minimum output (enforced on-chain), so a fill anywhere within the\nslippage tolerance can never break a later step; any positive surplus stays\nin the Credit Account (the preview reports the bound as estimated_max_dust).\nVery large loops relative to pool depth can still exceed the slippage\ntolerance through their own cumulative price impact \u2014 size accordingly or\nraise max_slippage_percent.\n\nThe Credit Account must already hold initial_collateral_amount of\ncollateral_token. For protocol=MORPHO pass a market_id from\n/v2/credit/morpho_markets.",
6274
+ "operationId": "v2_credit_loop",
6275
+ "requestBody": {
6276
+ "content": {
6277
+ "application/json": {
6278
+ "schema": {
6279
+ "$ref": "#/components/schemas/CreditLoopRequest"
6280
+ }
6281
+ }
6282
+ },
6283
+ "required": true
6284
+ },
6285
+ "responses": {
6286
+ "200": {
6287
+ "description": "Successful Response",
6288
+ "content": {
6289
+ "application/json": {
6290
+ "schema": {
6291
+ "$ref": "#/components/schemas/CreditLoopResponse"
6292
+ }
6293
+ }
6294
+ }
6295
+ },
6296
+ "422": {
6297
+ "description": "Validation Error",
6298
+ "content": {
6299
+ "application/json": {
6300
+ "schema": {
6301
+ "$ref": "#/components/schemas/HTTPValidationError"
6302
+ }
6303
+ }
6304
+ }
6305
+ }
6306
+ },
6307
+ "x-speakeasy-name-override": "credit_loop"
6308
+ }
6309
+ },
6147
6310
  "/v2/credit/transfer": {
6148
6311
  "post": {
6149
6312
  "tags": [
@@ -11670,6 +11833,30 @@
11670
11833
  "title": "Vault",
11671
11834
  "description": "Euler only: the EVK collateral vault holding this position."
11672
11835
  },
11836
+ "market_id": {
11837
+ "anyOf": [
11838
+ {
11839
+ "type": "string"
11840
+ },
11841
+ {
11842
+ "type": "null"
11843
+ }
11844
+ ],
11845
+ "title": "Market Id",
11846
+ "description": "Morpho only: the bytes32 id of the isolated market holding this position."
11847
+ },
11848
+ "is_pure_supply": {
11849
+ "anyOf": [
11850
+ {
11851
+ "type": "boolean"
11852
+ },
11853
+ {
11854
+ "type": "null"
11855
+ }
11856
+ ],
11857
+ "title": "Is Pure Supply",
11858
+ "description": "Morpho only: true when this is a loan-asset supply position (earning supply APY) rather than collateral backing borrows."
11859
+ },
11673
11860
  "amount_supplied": {
11674
11861
  "anyOf": [
11675
11862
  {
@@ -11817,6 +12004,7 @@
11817
12004
  "enum": [
11818
12005
  "arbitrum",
11819
12006
  "base",
12007
+ "bsc",
11820
12008
  "ethereum",
11821
12009
  "tempo"
11822
12010
  ],
@@ -11890,6 +12078,7 @@
11890
12078
  "enum": [
11891
12079
  "arbitrum",
11892
12080
  "base",
12081
+ "bsc",
11893
12082
  "ethereum",
11894
12083
  "tempo"
11895
12084
  ],
@@ -12115,6 +12304,18 @@
12115
12304
  ],
12116
12305
  "title": "Borrow Vault",
12117
12306
  "description": "Euler only: the EVK vault to borrow from. Required when protocol=EULER."
12307
+ },
12308
+ "market_id": {
12309
+ "anyOf": [
12310
+ {
12311
+ "type": "string"
12312
+ },
12313
+ {
12314
+ "type": "null"
12315
+ }
12316
+ ],
12317
+ "title": "Market Id",
12318
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
12118
12319
  }
12119
12320
  },
12120
12321
  "type": "object",
@@ -12167,6 +12368,18 @@
12167
12368
  "title": "Borrow Vault",
12168
12369
  "description": "Euler only: the EVK vault to borrow from. Required when protocol=EULER."
12169
12370
  },
12371
+ "market_id": {
12372
+ "anyOf": [
12373
+ {
12374
+ "type": "string"
12375
+ },
12376
+ {
12377
+ "type": "null"
12378
+ }
12379
+ ],
12380
+ "title": "Market Id",
12381
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
12382
+ },
12170
12383
  "token_in": {
12171
12384
  "anyOf": [
12172
12385
  {
@@ -12595,60 +12808,86 @@
12595
12808
  "title": "CreditFee",
12596
12809
  "description": "Fee configuration for credit-product actions.\n\nSame shape as `Fee`, but narrows `denomination` to the values supported by\ncredit borrows. PERFORMANCE is not supported because realized-profit fees\nare not meaningful for debt positions."
12597
12810
  },
12598
- "CreditPositionsResponse": {
12811
+ "CreditLoopPreview": {
12599
12812
  "properties": {
12600
- "collateral_positions": {
12601
- "items": {
12602
- "$ref": "#/components/schemas/CollateralPosition"
12603
- },
12604
- "type": "array",
12605
- "title": "Collateral Positions",
12606
- "description": "All collateral positions, one per reserve.",
12607
- "example": []
12813
+ "iterations": {
12814
+ "type": "integer",
12815
+ "title": "Iterations",
12816
+ "description": "Number of loop iterations bundled."
12608
12817
  },
12609
- "debt_positions": {
12610
- "items": {
12611
- "$ref": "#/components/schemas/DebtPosition"
12612
- },
12613
- "type": "array",
12614
- "title": "Debt Positions",
12615
- "description": "All debt positions, one per reserve.",
12616
- "example": []
12818
+ "total_collateral_supplied": {
12819
+ "type": "string",
12820
+ "title": "Total Collateral Supplied",
12821
+ "description": "Guaranteed minimum total collateral supplied (token units); actual can only be higher (swap fills above the floor become dust)."
12617
12822
  },
12618
- "account_summary": {
12619
- "$ref": "#/components/schemas/AccountSummary",
12620
- "description": "Aave account-level summary (health factor, LTV, etc.)."
12823
+ "total_borrowed": {
12824
+ "type": "string",
12825
+ "title": "Total Borrowed",
12826
+ "description": "Total loan tokens borrowed across iterations."
12621
12827
  },
12622
- "euler_account_summary": {
12623
- "anyOf": [
12624
- {
12625
- "$ref": "#/components/schemas/AccountSummary"
12626
- },
12627
- {
12628
- "type": "null"
12629
- }
12630
- ],
12631
- "description": "Euler account-level summary (health factor, LTV, etc.), present only when the account holds Euler positions. Null for Aave-only accounts."
12828
+ "achieved_multiplier": {
12829
+ "type": "string",
12830
+ "title": "Achieved Multiplier",
12831
+ "description": "Guaranteed leverage floor: total_collateral_supplied / initial_collateral_amount."
12632
12832
  },
12633
- "euler_borrowable_tokens": {
12634
- "items": {
12635
- "$ref": "#/components/schemas/BorrowableToken"
12636
- },
12637
- "type": "array",
12638
- "title": "Euler Borrowable Tokens",
12639
- "description": "Euler-only: additional borrowable amounts given the account's current Euler controller (i.e. borrow more of the controller's asset). Empty for accounts with no Euler borrow position \u2014 use /credit/euler_markets to discover a new market to borrow from.",
12640
- "example": []
12833
+ "projected_ltv": {
12834
+ "type": "string",
12835
+ "title": "Projected Ltv",
12836
+ "description": "Projected end loan-to-value in percent, at the sizing oracle prices."
12641
12837
  },
12642
- "borrowable_tokens": {
12838
+ "projected_health_factor": {
12839
+ "type": "string",
12840
+ "title": "Projected Health Factor",
12841
+ "description": "Projected health factor (liquidation threshold / projected LTV). Below 1 would be liquidatable \u2014 the request is rejected long before that."
12842
+ },
12843
+ "estimated_max_dust": {
12844
+ "type": "string",
12845
+ "title": "Estimated Max Dust",
12846
+ "description": "Upper bound of collateral-token surplus the swaps can leave in the Credit Account (sum of quote \u2212 guaranteed floor per swap). It is bounded by max_slippage_percent per iteration, stays in the account, and is never lost."
12847
+ },
12848
+ "legs": {
12643
12849
  "items": {
12644
- "$ref": "#/components/schemas/BorrowableToken"
12850
+ "$ref": "#/components/schemas/LoopLegPreview"
12645
12851
  },
12646
12852
  "type": "array",
12647
- "title": "Borrowable Tokens",
12648
- "description": "All tokens available for borrowing with max amounts based on current collateral.",
12853
+ "title": "Legs",
12854
+ "description": "Per-iteration breakdown.",
12649
12855
  "example": []
12856
+ }
12857
+ },
12858
+ "additionalProperties": false,
12859
+ "type": "object",
12860
+ "required": [
12861
+ "iterations",
12862
+ "total_collateral_supplied",
12863
+ "total_borrowed",
12864
+ "achieved_multiplier",
12865
+ "projected_ltv",
12866
+ "projected_health_factor",
12867
+ "estimated_max_dust"
12868
+ ],
12869
+ "title": "CreditLoopPreview",
12870
+ "description": "Projected end state of the loop, computed on GUARANTEED swap floors."
12871
+ },
12872
+ "CreditLoopRequest": {
12873
+ "properties": {
12874
+ "owner": {
12875
+ "type": "string",
12876
+ "title": "Owner",
12877
+ "description": "The address that owns the Credit Account.",
12878
+ "example": "0x5e5b00ed886A6879C2B934612D2312975427fcAf"
12650
12879
  },
12651
- "total_usd_value": {
12880
+ "chain": {
12881
+ "$ref": "#/components/schemas/Chain",
12882
+ "description": "Blockchain network.",
12883
+ "example": "ethereum"
12884
+ },
12885
+ "protocol": {
12886
+ "$ref": "#/components/schemas/CreditProtocol",
12887
+ "description": "Lending protocol to loop into: AAVE or MORPHO. EULER looping is not available yet.",
12888
+ "example": "AAVE"
12889
+ },
12890
+ "market_id": {
12652
12891
  "anyOf": [
12653
12892
  {
12654
12893
  "type": "string"
@@ -12657,8 +12896,263 @@
12657
12896
  "type": "null"
12658
12897
  }
12659
12898
  ],
12660
- "title": "Total Usd Value",
12661
- "description": "Net position value in USD (total collateral - total debt). Null if prices unavailable."
12899
+ "title": "Market Id",
12900
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
12901
+ },
12902
+ "collateral_token": {
12903
+ "type": "string",
12904
+ "title": "Token",
12905
+ "description": "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.",
12906
+ "example": "WETH"
12907
+ },
12908
+ "borrow_token": {
12909
+ "type": "string",
12910
+ "title": "Token",
12911
+ "description": "Token borrowed each iteration and swapped back to the collateral token. For MORPHO it must be the market's loan token.",
12912
+ "example": "USDC"
12913
+ },
12914
+ "initial_collateral_amount": {
12915
+ "anyOf": [
12916
+ {
12917
+ "type": "number",
12918
+ "exclusiveMinimum": 0.0
12919
+ },
12920
+ {
12921
+ "type": "string",
12922
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
12923
+ }
12924
+ ],
12925
+ "title": "Initial Collateral Amount",
12926
+ "description": "Collateral (in token units) already held in the Credit Account to seed the loop.",
12927
+ "example": 1
12928
+ },
12929
+ "multiplier": {
12930
+ "anyOf": [
12931
+ {
12932
+ "type": "number",
12933
+ "exclusiveMinimum": 1.0
12934
+ },
12935
+ {
12936
+ "type": "string",
12937
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
12938
+ }
12939
+ ],
12940
+ "title": "Multiplier",
12941
+ "description": "Target leverage: total collateral exposure = multiplier \u00d7 initial_collateral_amount. Must be achievable at the requested loan_to_value (max \u2248 0.9 / (1 \u2212 LTV)).",
12942
+ "example": 2
12943
+ },
12944
+ "loan_to_value": {
12945
+ "anyOf": [
12946
+ {
12947
+ "type": "number",
12948
+ "maximum": 100.0,
12949
+ "exclusiveMinimum": 0.0
12950
+ },
12951
+ {
12952
+ "type": "string",
12953
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
12954
+ }
12955
+ ],
12956
+ "title": "Loan To Value",
12957
+ "description": "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); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.",
12958
+ "example": 70
12959
+ },
12960
+ "max_slippage_percent": {
12961
+ "anyOf": [
12962
+ {
12963
+ "type": "number",
12964
+ "maximum": 10.0,
12965
+ "exclusiveMinimum": 0.0
12966
+ },
12967
+ {
12968
+ "type": "string",
12969
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
12970
+ }
12971
+ ],
12972
+ "title": "Max Slippage Percent",
12973
+ "description": "Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust.",
12974
+ "example": "0.5"
12975
+ },
12976
+ "emode_category": {
12977
+ "anyOf": [
12978
+ {
12979
+ "type": "integer",
12980
+ "minimum": 0.0
12981
+ },
12982
+ {
12983
+ "type": "null"
12984
+ }
12985
+ ],
12986
+ "title": "Emode Category",
12987
+ "description": "Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated)."
12988
+ },
12989
+ "gas_sponsorship": {
12990
+ "type": "boolean",
12991
+ "title": "Gas Sponsorship",
12992
+ "description": "If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction.",
12993
+ "example": false
12994
+ }
12995
+ },
12996
+ "type": "object",
12997
+ "required": [
12998
+ "owner",
12999
+ "chain",
13000
+ "collateral_token",
13001
+ "borrow_token",
13002
+ "initial_collateral_amount",
13003
+ "multiplier",
13004
+ "loan_to_value"
13005
+ ],
13006
+ "title": "CreditLoopRequest",
13007
+ "description": "Open a leveraged loop: repeatedly supply collateral, borrow, and swap the\nborrow back to collateral \u2014 all in ONE atomic transaction from the Credit\nAccount.",
13008
+ "example": {
13009
+ "owner": "0x5e5b00ed886A6879C2B934612D2312975427fcAf",
13010
+ "chain": "ethereum",
13011
+ "protocol": "AAVE",
13012
+ "collateral_token": "WETH",
13013
+ "borrow_token": "USDC",
13014
+ "initial_collateral_amount": 1,
13015
+ "multiplier": 2,
13016
+ "loan_to_value": 70,
13017
+ "max_slippage_percent": 0.5,
13018
+ "gas_sponsorship": false
13019
+ }
13020
+ },
13021
+ "CreditLoopResponse": {
13022
+ "properties": {
13023
+ "transaction": {
13024
+ "anyOf": [
13025
+ {
13026
+ "$ref": "#/components/schemas/UnsignedTransaction"
13027
+ },
13028
+ {
13029
+ "type": "null"
13030
+ }
13031
+ ],
13032
+ "description": "Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false."
13033
+ },
13034
+ "eip_712": {
13035
+ "anyOf": [
13036
+ {
13037
+ "$ref": "#/components/schemas/BatchedSafeOperationsResponse-Output"
13038
+ },
13039
+ {
13040
+ "type": "null"
13041
+ }
13042
+ ],
13043
+ "description": "EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true."
13044
+ },
13045
+ "preview": {
13046
+ "$ref": "#/components/schemas/CreditLoopPreview",
13047
+ "description": "Projected end state, computed on guaranteed swap floors."
13048
+ }
13049
+ },
13050
+ "type": "object",
13051
+ "required": [
13052
+ "preview"
13053
+ ],
13054
+ "title": "CreditLoopResponse",
13055
+ "description": "The atomic loop transaction plus its guaranteed-floor preview."
13056
+ },
13057
+ "CreditLoopedPositionsResponse": {
13058
+ "properties": {
13059
+ "credit_account_address": {
13060
+ "type": "string",
13061
+ "title": "Credit Account Address",
13062
+ "description": "The credit product account address derived from the owner."
13063
+ },
13064
+ "positions": {
13065
+ "items": {
13066
+ "$ref": "#/components/schemas/LoopedPosition"
13067
+ },
13068
+ "type": "array",
13069
+ "title": "Positions",
13070
+ "description": "All looped positions, on both Aave and Morpho.",
13071
+ "example": []
13072
+ },
13073
+ "aave_account_summary": {
13074
+ "anyOf": [
13075
+ {
13076
+ "$ref": "#/components/schemas/AccountSummary"
13077
+ },
13078
+ {
13079
+ "type": "null"
13080
+ }
13081
+ ],
13082
+ "description": "Aave account-level summary (health factor, LTV, borrow capacity). Present when the account holds any open Aave looped position, since Aave collateral is pooled and health is account-level. Null for Morpho-only accounts."
13083
+ }
13084
+ },
13085
+ "type": "object",
13086
+ "required": [
13087
+ "credit_account_address"
13088
+ ],
13089
+ "title": "CreditLoopedPositionsResponse",
13090
+ "description": "Looped positions across Aave V3 and Morpho Blue for a credit account."
13091
+ },
13092
+ "CreditPositionsResponse": {
13093
+ "properties": {
13094
+ "collateral_positions": {
13095
+ "items": {
13096
+ "$ref": "#/components/schemas/CollateralPosition"
13097
+ },
13098
+ "type": "array",
13099
+ "title": "Collateral Positions",
13100
+ "description": "All collateral positions, one per reserve.",
13101
+ "example": []
13102
+ },
13103
+ "debt_positions": {
13104
+ "items": {
13105
+ "$ref": "#/components/schemas/DebtPosition"
13106
+ },
13107
+ "type": "array",
13108
+ "title": "Debt Positions",
13109
+ "description": "All debt positions, one per reserve.",
13110
+ "example": []
13111
+ },
13112
+ "account_summary": {
13113
+ "$ref": "#/components/schemas/AccountSummary",
13114
+ "description": "Aave account-level summary (health factor, LTV, etc.)."
13115
+ },
13116
+ "euler_account_summary": {
13117
+ "anyOf": [
13118
+ {
13119
+ "$ref": "#/components/schemas/AccountSummary"
13120
+ },
13121
+ {
13122
+ "type": "null"
13123
+ }
13124
+ ],
13125
+ "description": "Euler account-level summary (health factor, LTV, etc.), present only when the account holds Euler positions. Null for Aave-only accounts."
13126
+ },
13127
+ "euler_borrowable_tokens": {
13128
+ "items": {
13129
+ "$ref": "#/components/schemas/BorrowableToken"
13130
+ },
13131
+ "type": "array",
13132
+ "title": "Euler Borrowable Tokens",
13133
+ "description": "Euler-only: additional borrowable amounts given the account's current Euler controller (i.e. borrow more of the controller's asset). Empty for accounts with no Euler borrow position \u2014 use /credit/euler_markets to discover a new market to borrow from.",
13134
+ "example": []
13135
+ },
13136
+ "borrowable_tokens": {
13137
+ "items": {
13138
+ "$ref": "#/components/schemas/BorrowableToken"
13139
+ },
13140
+ "type": "array",
13141
+ "title": "Borrowable Tokens",
13142
+ "description": "All tokens available for borrowing with max amounts based on current collateral.",
13143
+ "example": []
13144
+ },
13145
+ "total_usd_value": {
13146
+ "anyOf": [
13147
+ {
13148
+ "type": "string"
13149
+ },
13150
+ {
13151
+ "type": "null"
13152
+ }
13153
+ ],
13154
+ "title": "Total Usd Value",
13155
+ "description": "Net position value in USD (total collateral - total debt). Null if prices unavailable."
12662
13156
  }
12663
13157
  },
12664
13158
  "type": "object",
@@ -12672,10 +13166,11 @@
12672
13166
  "type": "string",
12673
13167
  "enum": [
12674
13168
  "AAVE",
12675
- "EULER"
13169
+ "EULER",
13170
+ "MORPHO"
12676
13171
  ],
12677
13172
  "title": "CreditProtocol",
12678
- "description": "Which lending protocol a credit action targets.\n\n``AAVE`` is the default so existing callers (which never send a ``protocol``\nfield) keep hitting the unchanged Aave code path. ``EULER`` opts in to the\nEuler V2 path, where the market is identified by EVK vault address(es)."
13173
+ "description": "Which lending protocol a credit action targets.\n\n``AAVE`` is the default so existing callers (which never send a ``protocol``\nfield) keep hitting the unchanged Aave code path. ``EULER`` opts in to the\nEuler V2 path, where the market is identified by EVK vault address(es).\n``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is\ncurrently read-only: positions and market discovery only \u2014 transaction\nbuilders land with the looping work (COM-7106/7107/7108), so transact\nendpoints reject it with a 422."
12679
13174
  },
12680
13175
  "CreditRepayParams": {
12681
13176
  "properties": {
@@ -12725,6 +13220,18 @@
12725
13220
  ],
12726
13221
  "title": "Borrow Vault",
12727
13222
  "description": "Euler only: the EVK vault the debt is owed to. Required when protocol=EULER."
13223
+ },
13224
+ "market_id": {
13225
+ "anyOf": [
13226
+ {
13227
+ "type": "string"
13228
+ },
13229
+ {
13230
+ "type": "null"
13231
+ }
13232
+ ],
13233
+ "title": "Market Id",
13234
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
12728
13235
  }
12729
13236
  },
12730
13237
  "type": "object",
@@ -12765,6 +13272,18 @@
12765
13272
  "title": "Borrow Vault",
12766
13273
  "description": "Euler only: the EVK vault the debt is owed to (repay target). Required when protocol=EULER."
12767
13274
  },
13275
+ "market_id": {
13276
+ "anyOf": [
13277
+ {
13278
+ "type": "string"
13279
+ },
13280
+ {
13281
+ "type": "null"
13282
+ }
13283
+ ],
13284
+ "title": "Market Id",
13285
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
13286
+ },
12768
13287
  "collateral_vault": {
12769
13288
  "anyOf": [
12770
13289
  {
@@ -13015,6 +13534,18 @@
13015
13534
  ],
13016
13535
  "title": "Collateral Vault",
13017
13536
  "description": "Euler only: the EVK collateral vault to supply into. Required when protocol=EULER."
13537
+ },
13538
+ "market_id": {
13539
+ "anyOf": [
13540
+ {
13541
+ "type": "string"
13542
+ },
13543
+ {
13544
+ "type": "null"
13545
+ }
13546
+ ],
13547
+ "title": "Market Id",
13548
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
13018
13549
  }
13019
13550
  },
13020
13551
  "type": "object",
@@ -13275,7 +13806,19 @@
13275
13806
  ],
13276
13807
  "title": "Collateral Vault",
13277
13808
  "description": "Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER."
13278
- }
13809
+ },
13810
+ "market_id": {
13811
+ "anyOf": [
13812
+ {
13813
+ "type": "string"
13814
+ },
13815
+ {
13816
+ "type": "null"
13817
+ }
13818
+ ],
13819
+ "title": "Market Id",
13820
+ "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
13821
+ }
13279
13822
  },
13280
13823
  "type": "object",
13281
13824
  "required": [
@@ -13314,6 +13857,30 @@
13314
13857
  "title": "Vault",
13315
13858
  "description": "Euler only: the EVK borrow vault this debt is owed to."
13316
13859
  },
13860
+ "market_id": {
13861
+ "anyOf": [
13862
+ {
13863
+ "type": "string"
13864
+ },
13865
+ {
13866
+ "type": "null"
13867
+ }
13868
+ ],
13869
+ "title": "Market Id",
13870
+ "description": "Morpho only: the bytes32 id of the isolated market this debt is owed to."
13871
+ },
13872
+ "health_factor": {
13873
+ "anyOf": [
13874
+ {
13875
+ "type": "string"
13876
+ },
13877
+ {
13878
+ "type": "null"
13879
+ }
13880
+ ],
13881
+ "title": "Health Factor",
13882
+ "description": "Morpho only: this market's health factor (markets are isolated, so health is per market \u2014 below 1 the position is liquidatable). Null for other protocols and when the oracle read fails."
13883
+ },
13317
13884
  "amount_borrowed": {
13318
13885
  "anyOf": [
13319
13886
  {
@@ -16394,148 +16961,549 @@
16394
16961
  "properties": {
16395
16962
  "owner": {
16396
16963
  "type": "string",
16397
- "title": "Owner",
16398
- "description": "The user's EOA address (owner of the global markets perps account)",
16399
- "example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
16964
+ "title": "Owner",
16965
+ "description": "The user's EOA address (owner of the global markets perps account)",
16966
+ "example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
16967
+ },
16968
+ "amount": {
16969
+ "type": "string",
16970
+ "title": "Amount",
16971
+ "description": "USDC amount to withdraw (human-readable, e.g. '500.0')",
16972
+ "example": "100.0"
16973
+ },
16974
+ "destination": {
16975
+ "anyOf": [
16976
+ {
16977
+ "type": "string"
16978
+ },
16979
+ {
16980
+ "type": "null"
16981
+ }
16982
+ ],
16983
+ "title": "Destination",
16984
+ "description": "Arbitrum destination address (defaults to owner if not specified)"
16985
+ }
16986
+ },
16987
+ "type": "object",
16988
+ "required": [
16989
+ "owner",
16990
+ "amount"
16991
+ ],
16992
+ "title": "GlobalMarketsPerpsWithdrawRequest",
16993
+ "description": "Request to withdraw USDC from HyperEVM global markets perps account to Arbitrum.",
16994
+ "example": {
16995
+ "owner": "0x06A9aF046187895AcFc7258450B15397CAc67400",
16996
+ "amount": "100.0"
16997
+ }
16998
+ },
16999
+ "HTTPValidationError": {
17000
+ "properties": {
17001
+ "detail": {
17002
+ "items": {
17003
+ "$ref": "#/components/schemas/ValidationError"
17004
+ },
17005
+ "type": "array",
17006
+ "title": "Detail"
17007
+ }
17008
+ },
17009
+ "type": "object",
17010
+ "title": "HTTPValidationError"
17011
+ },
17012
+ "InterestRateMode": {
17013
+ "type": "string",
17014
+ "enum": [
17015
+ "stable",
17016
+ "variable"
17017
+ ],
17018
+ "title": "InterestRateMode",
17019
+ "description": "On AAVE there are 2 different interest modes.\n\nA stable (but typically higher rate), or a variable rate."
17020
+ },
17021
+ "LiquidationCall": {
17022
+ "properties": {
17023
+ "id": {
17024
+ "type": "string",
17025
+ "title": "Id",
17026
+ "description": "The id of a historical transaction on aave"
17027
+ },
17028
+ "timestamp": {
17029
+ "type": "integer",
17030
+ "title": "Timestamp",
17031
+ "description": "Timestamp in unix time"
17032
+ },
17033
+ "txHash": {
17034
+ "type": "string",
17035
+ "title": "Txhash",
17036
+ "description": "Transaction hash. You can paste these into the search bar on etherscan"
17037
+ },
17038
+ "collateralAmount": {
17039
+ "type": "number",
17040
+ "title": "Collateralamount"
17041
+ },
17042
+ "collateralReserve": {
17043
+ "$ref": "#/components/schemas/Reserve",
17044
+ "description": "Stores information about Token"
17045
+ },
17046
+ "principalAmount": {
17047
+ "type": "number",
17048
+ "title": "Principalamount"
17049
+ },
17050
+ "principalReserve": {
17051
+ "$ref": "#/components/schemas/Reserve",
17052
+ "description": "Stores information about Token"
17053
+ },
17054
+ "collateralAssetPriceUSD": {
17055
+ "type": "number",
17056
+ "title": "Collateralassetpriceusd"
17057
+ },
17058
+ "borrowAssetPriceUSD": {
17059
+ "type": "number",
17060
+ "title": "Borrowassetpriceusd"
17061
+ },
17062
+ "action": {
17063
+ "type": "string",
17064
+ "const": "LiquidationCall",
17065
+ "title": "Action"
17066
+ },
17067
+ "block": {
17068
+ "type": "integer",
17069
+ "title": "Block",
17070
+ "readOnly": true
17071
+ }
17072
+ },
17073
+ "type": "object",
17074
+ "required": [
17075
+ "id",
17076
+ "timestamp",
17077
+ "txHash",
17078
+ "collateralAmount",
17079
+ "collateralReserve",
17080
+ "principalAmount",
17081
+ "principalReserve",
17082
+ "collateralAssetPriceUSD",
17083
+ "borrowAssetPriceUSD",
17084
+ "action",
17085
+ "block"
17086
+ ],
17087
+ "title": "LiquidationCall"
17088
+ },
17089
+ "ListAaveMarketsResponse": {
17090
+ "properties": {
17091
+ "markets": {
17092
+ "additionalProperties": {
17093
+ "$ref": "#/components/schemas/TokenMarketData"
17094
+ },
17095
+ "type": "object",
17096
+ "title": "Markets",
17097
+ "description": "Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY."
17098
+ }
17099
+ },
17100
+ "type": "object",
17101
+ "required": [
17102
+ "markets"
17103
+ ],
17104
+ "title": "ListAaveMarketsResponse",
17105
+ "description": "Response containing Aave market rates organized by token symbol."
17106
+ },
17107
+ "LoopLegPreview": {
17108
+ "properties": {
17109
+ "supply_amount": {
17110
+ "anyOf": [
17111
+ {
17112
+ "type": "string"
17113
+ },
17114
+ {
17115
+ "type": "null"
17116
+ }
17117
+ ],
17118
+ "title": "Supply Amount",
17119
+ "description": "Collateral supplied this iteration (token units)."
17120
+ },
17121
+ "borrow_amount": {
17122
+ "anyOf": [
17123
+ {
17124
+ "type": "string"
17125
+ },
17126
+ {
17127
+ "type": "null"
17128
+ }
17129
+ ],
17130
+ "title": "Borrow Amount",
17131
+ "description": "Loan borrowed this iteration; null on the final supply-only iteration."
17132
+ },
17133
+ "min_swap_out": {
17134
+ "anyOf": [
17135
+ {
17136
+ "type": "string"
17137
+ },
17138
+ {
17139
+ "type": "null"
17140
+ }
17141
+ ],
17142
+ "title": "Min Swap Out",
17143
+ "description": "Guaranteed swap output (collateral units) \u2014 the next iteration's supply. Enforced on-chain by the swap's minimum-return."
17144
+ }
17145
+ },
17146
+ "additionalProperties": false,
17147
+ "type": "object",
17148
+ "required": [
17149
+ "supply_amount"
17150
+ ],
17151
+ "title": "LoopLegPreview",
17152
+ "description": "One planned loop iteration."
17153
+ },
17154
+ "LoopedPosition": {
17155
+ "properties": {
17156
+ "protocol": {
17157
+ "$ref": "#/components/schemas/CreditProtocol",
17158
+ "description": "Lending protocol this position is on (AAVE or MORPHO)."
17159
+ },
17160
+ "market_id": {
17161
+ "anyOf": [
17162
+ {
17163
+ "type": "string"
17164
+ },
17165
+ {
17166
+ "type": "null"
17167
+ }
17168
+ ],
17169
+ "title": "Market Id",
17170
+ "description": "Morpho only: the bytes32 id of the isolated market."
17171
+ },
17172
+ "collateral_token": {
17173
+ "type": "string",
17174
+ "title": "Collateral Token",
17175
+ "description": "Address of the collateral token."
17176
+ },
17177
+ "collateral_symbol": {
17178
+ "type": "string",
17179
+ "title": "Collateral Symbol",
17180
+ "description": "Symbol of the collateral token."
17181
+ },
17182
+ "debt_token": {
17183
+ "type": "string",
17184
+ "title": "Debt Token",
17185
+ "description": "Address of the debt token."
17186
+ },
17187
+ "debt_symbol": {
17188
+ "type": "string",
17189
+ "title": "Debt Symbol",
17190
+ "description": "Symbol of the debt token."
17191
+ },
17192
+ "status": {
17193
+ "type": "string",
17194
+ "enum": [
17195
+ "OPEN",
17196
+ "CLOSED"
17197
+ ],
17198
+ "title": "Status",
17199
+ "description": "Whether the position is currently open or fully closed."
17200
+ },
17201
+ "opened_at": {
17202
+ "type": "string",
17203
+ "format": "date-time",
17204
+ "title": "Opened At",
17205
+ "description": "Timestamp of the position's first transaction."
17206
+ },
17207
+ "closed_at": {
17208
+ "anyOf": [
17209
+ {
17210
+ "type": "string",
17211
+ "format": "date-time"
17212
+ },
17213
+ {
17214
+ "type": "null"
17215
+ }
17216
+ ],
17217
+ "title": "Closed At",
17218
+ "description": "Timestamp the position was fully closed; null while open."
17219
+ },
17220
+ "current": {
17221
+ "anyOf": [
17222
+ {
17223
+ "$ref": "#/components/schemas/LoopedPositionCurrentState"
17224
+ },
17225
+ {
17226
+ "type": "null"
17227
+ }
17228
+ ],
17229
+ "description": "Live on-chain state; null for CLOSED positions."
17230
+ },
17231
+ "totals": {
17232
+ "$ref": "#/components/schemas/LoopedPositionTotals",
17233
+ "description": "Lifetime totals across the position's history."
17234
+ },
17235
+ "history": {
17236
+ "items": {
17237
+ "$ref": "#/components/schemas/LoopedPositionHistoryEntry"
17238
+ },
17239
+ "type": "array",
17240
+ "title": "History",
17241
+ "description": "All transactions for this position, chronological.",
17242
+ "example": []
17243
+ }
17244
+ },
17245
+ "additionalProperties": false,
17246
+ "type": "object",
17247
+ "required": [
17248
+ "protocol",
17249
+ "collateral_token",
17250
+ "collateral_symbol",
17251
+ "debt_token",
17252
+ "debt_symbol",
17253
+ "status",
17254
+ "opened_at",
17255
+ "totals"
17256
+ ],
17257
+ "title": "LoopedPosition",
17258
+ "description": "A single looped (leveraged) position with its full history."
17259
+ },
17260
+ "LoopedPositionCurrentState": {
17261
+ "properties": {
17262
+ "collateral_amount": {
17263
+ "anyOf": [
17264
+ {
17265
+ "type": "string"
17266
+ },
17267
+ {
17268
+ "type": "null"
17269
+ }
17270
+ ],
17271
+ "title": "Collateral Amount",
17272
+ "description": "Current on-chain collateral amount for this position."
17273
+ },
17274
+ "debt_amount": {
17275
+ "anyOf": [
17276
+ {
17277
+ "type": "string"
17278
+ },
17279
+ {
17280
+ "type": "null"
17281
+ }
17282
+ ],
17283
+ "title": "Debt Amount",
17284
+ "description": "Current on-chain debt amount for this position."
17285
+ },
17286
+ "collateral_usd": {
17287
+ "anyOf": [
17288
+ {
17289
+ "type": "string"
17290
+ },
17291
+ {
17292
+ "type": "null"
17293
+ }
17294
+ ],
17295
+ "title": "Collateral Usd",
17296
+ "description": "Collateral value in USD (null if unpriced)."
17297
+ },
17298
+ "debt_usd": {
17299
+ "anyOf": [
17300
+ {
17301
+ "type": "string"
17302
+ },
17303
+ {
17304
+ "type": "null"
17305
+ }
17306
+ ],
17307
+ "title": "Debt Usd",
17308
+ "description": "Debt value in USD (null if unpriced)."
17309
+ },
17310
+ "net_usd_value": {
17311
+ "anyOf": [
17312
+ {
17313
+ "type": "string"
17314
+ },
17315
+ {
17316
+ "type": "null"
17317
+ }
17318
+ ],
17319
+ "title": "Net Usd Value",
17320
+ "description": "Net position value in USD (collateral - debt); null if unpriced."
17321
+ },
17322
+ "leverage": {
17323
+ "anyOf": [
17324
+ {
17325
+ "type": "string"
17326
+ },
17327
+ {
17328
+ "type": "null"
17329
+ }
17330
+ ],
17331
+ "title": "Leverage",
17332
+ "description": "Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive."
17333
+ },
17334
+ "health_factor": {
17335
+ "anyOf": [
17336
+ {
17337
+ "type": "string"
17338
+ },
17339
+ {
17340
+ "type": "null"
17341
+ }
17342
+ ],
17343
+ "title": "Health Factor",
17344
+ "description": "Health factor. Above 1 is safe; below 1 risks liquidation. See health_factor_scope for what it covers."
17345
+ },
17346
+ "health_factor_scope": {
17347
+ "type": "string",
17348
+ "enum": [
17349
+ "market",
17350
+ "account"
17351
+ ],
17352
+ "title": "Health Factor Scope",
17353
+ "description": "'market' for Morpho (isolated per-market health). 'account' for Aave: collateral is pooled, so all collateral backs all debt and this health factor is shared by every Aave position on the account \u2014 see aave_account_summary for the account-level figures."
17354
+ }
17355
+ },
17356
+ "additionalProperties": false,
17357
+ "type": "object",
17358
+ "required": [
17359
+ "collateral_amount",
17360
+ "debt_amount",
17361
+ "health_factor_scope"
17362
+ ],
17363
+ "title": "LoopedPositionCurrentState",
17364
+ "description": "Live on-chain state of an OPEN looped position."
17365
+ },
17366
+ "LoopedPositionHistoryEntry": {
17367
+ "properties": {
17368
+ "transaction_hash": {
17369
+ "type": "string",
17370
+ "title": "Transaction Hash",
17371
+ "description": "Transaction hash."
17372
+ },
17373
+ "block_number": {
17374
+ "type": "integer",
17375
+ "title": "Block Number",
17376
+ "description": "Block number of the transaction."
17377
+ },
17378
+ "block_timestamp": {
17379
+ "type": "string",
17380
+ "format": "date-time",
17381
+ "title": "Block Timestamp",
17382
+ "description": "Timestamp of the transaction."
17383
+ },
17384
+ "classification": {
17385
+ "type": "string",
17386
+ "enum": [
17387
+ "loop_open",
17388
+ "loop_increase",
17389
+ "unwind",
17390
+ "supply",
17391
+ "withdraw",
17392
+ "borrow",
17393
+ "repay",
17394
+ "liquidation",
17395
+ "mixed"
17396
+ ],
17397
+ "title": "Classification",
17398
+ "description": "What this transaction did to the position: loop_open / loop_increase (lever up with a swap), unwind (delever), single-sided supply/withdraw/borrow/repay, liquidation, or mixed."
17399
+ },
17400
+ "iterations": {
17401
+ "anyOf": [
17402
+ {
17403
+ "type": "integer"
17404
+ },
17405
+ {
17406
+ "type": "null"
17407
+ }
17408
+ ],
17409
+ "title": "Iterations",
17410
+ "description": "Loop transactions only: number of borrow legs in this transaction (one per loop iteration). Null for non-loop transactions."
17411
+ },
17412
+ "collateral_delta": {
17413
+ "type": "string",
17414
+ "title": "Collateral Delta",
17415
+ "description": "Signed change in collateral in this transaction (positive = added)."
16400
17416
  },
16401
- "amount": {
17417
+ "debt_delta": {
16402
17418
  "type": "string",
16403
- "title": "Amount",
16404
- "description": "USDC amount to withdraw (human-readable, e.g. '500.0')",
16405
- "example": "100.0"
17419
+ "title": "Debt Delta",
17420
+ "description": "Signed change in debt in this transaction (positive = borrowed)."
16406
17421
  },
16407
- "destination": {
17422
+ "swap": {
16408
17423
  "anyOf": [
16409
17424
  {
16410
- "type": "string"
17425
+ "$ref": "#/components/schemas/SwapInfo"
16411
17426
  },
16412
17427
  {
16413
17428
  "type": "null"
16414
17429
  }
16415
17430
  ],
16416
- "title": "Destination",
16417
- "description": "Arbitrum destination address (defaults to owner if not specified)"
16418
- }
16419
- },
16420
- "type": "object",
16421
- "required": [
16422
- "owner",
16423
- "amount"
16424
- ],
16425
- "title": "GlobalMarketsPerpsWithdrawRequest",
16426
- "description": "Request to withdraw USDC from HyperEVM global markets perps account to Arbitrum.",
16427
- "example": {
16428
- "owner": "0x06A9aF046187895AcFc7258450B15397CAc67400",
16429
- "amount": "100.0"
16430
- }
16431
- },
16432
- "HTTPValidationError": {
16433
- "properties": {
16434
- "detail": {
17431
+ "description": "The swap leg detected in this transaction, if any."
17432
+ },
17433
+ "events": {
16435
17434
  "items": {
16436
- "$ref": "#/components/schemas/ValidationError"
17435
+ "$ref": "#/components/schemas/CreditEvent"
16437
17436
  },
16438
17437
  "type": "array",
16439
- "title": "Detail"
17438
+ "title": "Events",
17439
+ "description": "The raw lending events that make up this transaction (Morpho supply_collateral maps to 'supply', withdraw_collateral to 'withdraw').",
17440
+ "example": []
16440
17441
  }
16441
17442
  },
17443
+ "additionalProperties": false,
16442
17444
  "type": "object",
16443
- "title": "HTTPValidationError"
16444
- },
16445
- "InterestRateMode": {
16446
- "type": "string",
16447
- "enum": [
16448
- "stable",
16449
- "variable"
17445
+ "required": [
17446
+ "transaction_hash",
17447
+ "block_number",
17448
+ "block_timestamp",
17449
+ "classification",
17450
+ "collateral_delta",
17451
+ "debt_delta"
16450
17452
  ],
16451
- "title": "InterestRateMode",
16452
- "description": "On AAVE there are 2 different interest modes.\n\nA stable (but typically higher rate), or a variable rate."
17453
+ "title": "LoopedPositionHistoryEntry",
17454
+ "description": "One transaction in a looped position's lifetime."
16453
17455
  },
16454
- "LiquidationCall": {
17456
+ "LoopedPositionTotals": {
16455
17457
  "properties": {
16456
- "id": {
17458
+ "total_collateral_added": {
16457
17459
  "type": "string",
16458
- "title": "Id",
16459
- "description": "The id of a historical transaction on aave"
16460
- },
16461
- "timestamp": {
16462
- "type": "integer",
16463
- "title": "Timestamp",
16464
- "description": "Timestamp in unix time"
17460
+ "title": "Total Collateral Added",
17461
+ "description": "Total collateral added over the position's lifetime."
16465
17462
  },
16466
- "txHash": {
17463
+ "total_collateral_removed": {
16467
17464
  "type": "string",
16468
- "title": "Txhash",
16469
- "description": "Transaction hash. You can paste these into the search bar on etherscan"
16470
- },
16471
- "collateralAmount": {
16472
- "type": "number",
16473
- "title": "Collateralamount"
16474
- },
16475
- "collateralReserve": {
16476
- "$ref": "#/components/schemas/Reserve",
16477
- "description": "Stores information about Token"
16478
- },
16479
- "principalAmount": {
16480
- "type": "number",
16481
- "title": "Principalamount"
17465
+ "title": "Total Collateral Removed",
17466
+ "description": "Total collateral removed over the position's lifetime."
16482
17467
  },
16483
- "principalReserve": {
16484
- "$ref": "#/components/schemas/Reserve",
16485
- "description": "Stores information about Token"
17468
+ "total_debt_added": {
17469
+ "type": "string",
17470
+ "title": "Total Debt Added",
17471
+ "description": "Total debt borrowed over the position's lifetime."
16486
17472
  },
16487
- "collateralAssetPriceUSD": {
16488
- "type": "number",
16489
- "title": "Collateralassetpriceusd"
17473
+ "total_debt_removed": {
17474
+ "type": "string",
17475
+ "title": "Total Debt Removed",
17476
+ "description": "Total debt repaid over the position's lifetime."
16490
17477
  },
16491
- "borrowAssetPriceUSD": {
16492
- "type": "number",
16493
- "title": "Borrowassetpriceusd"
17478
+ "loop_tx_count": {
17479
+ "type": "integer",
17480
+ "title": "Loop Tx Count",
17481
+ "description": "Number of loop_open + loop_increase transactions."
16494
17482
  },
16495
- "action": {
16496
- "type": "string",
16497
- "const": "LiquidationCall",
16498
- "title": "Action"
17483
+ "unwind_tx_count": {
17484
+ "type": "integer",
17485
+ "title": "Unwind Tx Count",
17486
+ "description": "Number of unwind transactions."
16499
17487
  },
16500
- "block": {
17488
+ "liquidation_count": {
16501
17489
  "type": "integer",
16502
- "title": "Block",
16503
- "readOnly": true
16504
- }
16505
- },
16506
- "type": "object",
16507
- "required": [
16508
- "id",
16509
- "timestamp",
16510
- "txHash",
16511
- "collateralAmount",
16512
- "collateralReserve",
16513
- "principalAmount",
16514
- "principalReserve",
16515
- "collateralAssetPriceUSD",
16516
- "borrowAssetPriceUSD",
16517
- "action",
16518
- "block"
16519
- ],
16520
- "title": "LiquidationCall"
16521
- },
16522
- "ListAaveMarketsResponse": {
16523
- "properties": {
16524
- "markets": {
16525
- "additionalProperties": {
16526
- "$ref": "#/components/schemas/TokenMarketData"
16527
- },
16528
- "type": "object",
16529
- "title": "Markets",
16530
- "description": "Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY."
17490
+ "title": "Liquidation Count",
17491
+ "description": "Number of liquidation events."
16531
17492
  }
16532
17493
  },
17494
+ "additionalProperties": false,
16533
17495
  "type": "object",
16534
17496
  "required": [
16535
- "markets"
17497
+ "total_collateral_added",
17498
+ "total_collateral_removed",
17499
+ "total_debt_added",
17500
+ "total_debt_removed",
17501
+ "loop_tx_count",
17502
+ "unwind_tx_count",
17503
+ "liquidation_count"
16536
17504
  ],
16537
- "title": "ListAaveMarketsResponse",
16538
- "description": "Response containing Aave market rates organized by token symbol."
17505
+ "title": "LoopedPositionTotals",
17506
+ "description": "Lifetime totals across all of a looped position's transactions."
16539
17507
  },
16540
17508
  "LpBalance": {
16541
17509
  "properties": {
@@ -17657,6 +18625,130 @@
17657
18625
  ],
17658
18626
  "title": "MorphoGetVaultsResponse"
17659
18627
  },
18628
+ "MorphoLendingMarket": {
18629
+ "properties": {
18630
+ "market_id": {
18631
+ "type": "string",
18632
+ "title": "Market Id",
18633
+ "description": "Morpho Blue market id \u2014 the bytes32 keccak of the market's (loanToken, collateralToken, oracle, irm, lltv) tuple. Pass this to the Morpho credit actions to identify the market."
18634
+ },
18635
+ "loan_token": {
18636
+ "type": "string",
18637
+ "title": "Loan Token",
18638
+ "description": "Token that is supplied and borrowed in this market."
18639
+ },
18640
+ "loan_token_symbol": {
18641
+ "type": "string",
18642
+ "title": "Loan Token Symbol",
18643
+ "description": "Symbol of the loan token (e.g. USDC)."
18644
+ },
18645
+ "loan_token_decimals": {
18646
+ "type": "integer",
18647
+ "title": "Loan Token Decimals",
18648
+ "description": "Decimals of the loan token."
18649
+ },
18650
+ "collateral_token": {
18651
+ "type": "string",
18652
+ "title": "Collateral Token",
18653
+ "description": "Token accepted as collateral in this market."
18654
+ },
18655
+ "collateral_token_symbol": {
18656
+ "type": "string",
18657
+ "title": "Collateral Token Symbol",
18658
+ "description": "Symbol of the collateral token (e.g. wstETH)."
18659
+ },
18660
+ "collateral_token_decimals": {
18661
+ "type": "integer",
18662
+ "title": "Collateral Token Decimals",
18663
+ "description": "Decimals of the collateral token."
18664
+ },
18665
+ "oracle": {
18666
+ "type": "string",
18667
+ "title": "Oracle",
18668
+ "description": "Oracle pricing the collateral in loan-token terms for this market."
18669
+ },
18670
+ "irm": {
18671
+ "type": "string",
18672
+ "title": "Irm",
18673
+ "description": "Interest rate model contract of this market."
18674
+ },
18675
+ "lltv": {
18676
+ "type": "string",
18677
+ "title": "Lltv",
18678
+ "description": "Liquidation loan-to-value in percentage (e.g. 86 means a position is liquidatable once debt exceeds 86% of collateral value)."
18679
+ },
18680
+ "supply_apy": {
18681
+ "anyOf": [
18682
+ {
18683
+ "type": "string"
18684
+ },
18685
+ {
18686
+ "type": "null"
18687
+ }
18688
+ ],
18689
+ "title": "Supply Apy",
18690
+ "description": "Current supply APY for lending the loan token, in percentage (e.g. 3.5 means 3.5%). Null if the rate is unavailable."
18691
+ },
18692
+ "borrow_apy": {
18693
+ "anyOf": [
18694
+ {
18695
+ "type": "string"
18696
+ },
18697
+ {
18698
+ "type": "null"
18699
+ }
18700
+ ],
18701
+ "title": "Borrow Apy",
18702
+ "description": "Current borrow APY for the loan token, in percentage (e.g. 5.25 means 5.25%). Null if the rate is unavailable."
18703
+ },
18704
+ "utilization": {
18705
+ "type": "string",
18706
+ "title": "Utilization",
18707
+ "description": "Borrowed share of supplied assets, in percentage 0-100."
18708
+ },
18709
+ "total_supply_assets": {
18710
+ "type": "string",
18711
+ "title": "Total Supply Assets",
18712
+ "description": "Total loan tokens supplied to the market, in token units."
18713
+ },
18714
+ "total_borrow_assets": {
18715
+ "type": "string",
18716
+ "title": "Total Borrow Assets",
18717
+ "description": "Total loan tokens borrowed from the market, in token units."
18718
+ },
18719
+ "available_liquidity": {
18720
+ "type": "string",
18721
+ "title": "Available Liquidity",
18722
+ "description": "Loan tokens available to borrow or withdraw (supplied - borrowed), in token units."
18723
+ },
18724
+ "fee": {
18725
+ "type": "string",
18726
+ "title": "Fee",
18727
+ "description": "Protocol fee taken from interest, in percentage of interest (e.g. 0 means no fee)."
18728
+ }
18729
+ },
18730
+ "additionalProperties": false,
18731
+ "type": "object",
18732
+ "required": [
18733
+ "market_id",
18734
+ "loan_token",
18735
+ "loan_token_symbol",
18736
+ "loan_token_decimals",
18737
+ "collateral_token",
18738
+ "collateral_token_symbol",
18739
+ "collateral_token_decimals",
18740
+ "oracle",
18741
+ "irm",
18742
+ "lltv",
18743
+ "utilization",
18744
+ "total_supply_assets",
18745
+ "total_borrow_assets",
18746
+ "available_liquidity",
18747
+ "fee"
18748
+ ],
18749
+ "title": "MorphoLendingMarket",
18750
+ "description": "A Morpho Blue lending market: one isolated (collateral, loan) pair."
18751
+ },
17660
18752
  "MorphoMarket": {
17661
18753
  "properties": {
17662
18754
  "uniqueKey": {
@@ -17707,6 +18799,30 @@
17707
18799
  ],
17708
18800
  "title": "MorphoMarket"
17709
18801
  },
18802
+ "MorphoMarketsResponse": {
18803
+ "properties": {
18804
+ "morpho": {
18805
+ "type": "string",
18806
+ "title": "Morpho",
18807
+ "description": "Morpho Blue singleton contract the markets were read from."
18808
+ },
18809
+ "markets": {
18810
+ "items": {
18811
+ "$ref": "#/components/schemas/MorphoLendingMarket"
18812
+ },
18813
+ "type": "array",
18814
+ "title": "Markets",
18815
+ "description": "Curated lending markets with live LLTV, APYs, utilization, and liquidity.",
18816
+ "example": []
18817
+ }
18818
+ },
18819
+ "type": "object",
18820
+ "required": [
18821
+ "morpho"
18822
+ ],
18823
+ "title": "MorphoMarketsResponse",
18824
+ "description": "Curated Morpho Blue lending markets, read on-chain per request."
18825
+ },
17710
18826
  "MorphoRepayParams": {
17711
18827
  "properties": {
17712
18828
  "action_type": {
@@ -22561,6 +23677,64 @@
22561
23677
  ],
22562
23678
  "title": "SwapBorrowRate"
22563
23679
  },
23680
+ "SwapInfo": {
23681
+ "properties": {
23682
+ "sold_token": {
23683
+ "type": "string",
23684
+ "title": "Sold Token",
23685
+ "description": "Token sold in the swap (the borrowed/debt token)."
23686
+ },
23687
+ "sold_symbol": {
23688
+ "type": "string",
23689
+ "title": "Sold Symbol",
23690
+ "description": "Symbol of the sold token."
23691
+ },
23692
+ "sold_amount": {
23693
+ "type": "string",
23694
+ "title": "Sold Amount",
23695
+ "description": "Amount of the sold token."
23696
+ },
23697
+ "bought_token": {
23698
+ "type": "string",
23699
+ "title": "Bought Token",
23700
+ "description": "Token bought in the swap (the collateral token)."
23701
+ },
23702
+ "bought_symbol": {
23703
+ "type": "string",
23704
+ "title": "Bought Symbol",
23705
+ "description": "Symbol of the bought token."
23706
+ },
23707
+ "bought_amount": {
23708
+ "type": "string",
23709
+ "title": "Bought Amount",
23710
+ "description": "Amount of the bought token."
23711
+ },
23712
+ "router": {
23713
+ "anyOf": [
23714
+ {
23715
+ "type": "string"
23716
+ },
23717
+ {
23718
+ "type": "null"
23719
+ }
23720
+ ],
23721
+ "title": "Router",
23722
+ "description": "The outbound counterparty when it is the 1inch aggregation router. Null when the swap settled from an executor contract (informational only \u2014 never required to detect the swap)."
23723
+ }
23724
+ },
23725
+ "additionalProperties": false,
23726
+ "type": "object",
23727
+ "required": [
23728
+ "sold_token",
23729
+ "sold_symbol",
23730
+ "sold_amount",
23731
+ "bought_token",
23732
+ "bought_symbol",
23733
+ "bought_amount"
23734
+ ],
23735
+ "title": "SwapInfo",
23736
+ "description": "The DEX swap leg detected inside a loop transaction.\n\nEvidence is token-filtered and executor-proof: the sold (debt) token left the\naccount to a non-protocol counterparty and the bought (collateral) token\narrived from a non-protocol counterparty. 1inch fills often settle from an\nexecutor contract, so the router is recorded only when it happens to be the\noutbound counterparty \u2014 it is never required for detection."
23737
+ },
22564
23738
  "SyPosition": {
22565
23739
  "properties": {
22566
23740
  "syId": {