{
"error": {
"code": 400,
"message": "Request could not be processed.",
"simulation": {
"decoded": "<string>",
"logs": [
"<string>"
],
"serializedTransaction": "<string>"
}
}
}
{
"error": {
"code": 400,
"message": "Request could not be processed.",
"simulation": {
"decoded": "<string>",
"logs": [
"<string>"
],
"serializedTransaction": "<string>"
}
}
}
{
"error": {
"code": 400,
"message": "Request could not be processed.",
"simulation": {
"decoded": "<string>",
"logs": [
"<string>"
],
"serializedTransaction": "<string>"
}
}
}
{
"error": {
"code": 400,
"message": "Request could not be processed.",
"simulation": {
"decoded": "<string>",
"logs": [
"<string>"
],
"serializedTransaction": "<string>"
}
}
}
Borrowing
Withdraw collateral
Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Loopscale Docs","description":"Learn about the core concepts of Loopscale, a modular, order book-based lending protocol on Solana.","colors":{"primary":"#276ED6","light":"#F8F9FB","dark":"#151619"},"logo":{"light":"https://mintcdn.com/loopscale-docs/7wEScHg4Gg_v9bhc/static/assets/logo/light.svg?fit=max\u0026auto=format\u0026n=7wEScHg4Gg_v9bhc\u0026q=85\u0026s=e3d7a3c8bd59969d54c957404dcb2ca9","dark":"https://mintcdn.com/loopscale-docs/7wEScHg4Gg_v9bhc/static/assets/logo/dark.svg?fit=max\u0026auto=format\u0026n=7wEScHg4Gg_v9bhc\u0026q=85\u0026s=5074f5d533c90f66fbd5a16a0c9d2f2c","href":"https://docs.loopscale.com"},"favicon":"https://mintcdn.com/loopscale-docs/7wEScHg4Gg_v9bhc/static/assets/favicon.svg?fit=max\u0026auto=format\u0026n=7wEScHg4Gg_v9bhc\u0026q=85\u0026s=af942e7b33a749dc1469466c347f1574","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://loopscale.com","label":"Website"},{"href":"https://blog.loopscale.com","label":"Blog"},{"href":"https://discord.com/channels/895116209958297631/1341918308211097630","label":"Support"}],"primary":{"type":"button","label":"Launch App","href":"https://app.loopscale.com"}},"footer":{"socials":{"x":"https://x.com/Loopscale","discord":"https://discord.gg/loopscale","linkedin":"https://linkedin.com/company/LoopscaleLabs","website":"https://loopscale.com"}},"seo":{"metatags":{"canonical":"https://docs.loopscale.com"},"indexing":"all"},"fonts":{"family":"ABC Diatype Unlicensed Trial","source":"https://loopscale-site.s3.us-east-1.amazonaws.com/fonts/ABCDiatype-Regular-Trial.woff","format":"woff"},"icons":{"library":"fontawesome"},"interaction":{"drilldown":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"loopscale-docs","hasAudioNarration":false,"actualSubdomain":"loopscale-docs","customDomains":["docs.loopscale.com"],"gitSource":{"type":"github","owner":"orca-so","repo":"loopscale-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aeb91d35a47ccea21b959d0","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API Reference","count":53},{"language":"default","tag":"Transaction Endpoints","count":35},{"language":"default","tag":"Product Docs","count":28},{"language":"default","tag":"Data Endpoints","count":15},{"language":"default","tag":"Borrowing","count":12},{"language":"default","tag":"Earn Vaults","count":11},{"language":"default","tag":"Partners","count":10},{"language":"default","tag":"Resources","count":10},{"language":"default","tag":"Using Loopscale","count":9},{"language":"default","tag":"Protocol Concepts","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"static/styles.css","content":"@font-face{font-family:\"ABC Diatype Unlicensed Trial\";src:url(\"https://loopscale-site.s3.us-east-1.amazonaws.com/fonts/ABCDiatype-Regular-Trial.woff\");font-weight:400}@font-face{font-family:\"ABC Diatype Unlicensed Trial\";src:url(\"https://loopscale-site.s3.us-east-1.amazonaws.com/fonts/ABCDiatype-Medium-Trial.woff\");font-weight:600}@font-face{font-family:\"ABC Diatype Unlicensed Trial\";src:url(\"https://loopscale-site.s3.us-east-1.amazonaws.com/fonts/ABCDiatype-Bold-Trial.woff\");font-weight:700}:root{--blue: 39 110 214;--light: 248 249 251;--black: 21 22 25;--gray: 110 133 145;--white: 255 255 255;--brand-blue: rgb(var(--blue));--brand-light: rgb(var(--light));--brand-black: rgb(var(--black));--brand-gray: rgb(var(--gray));--brand-white: rgb(var(--white));--brand-pink: #fac1e2;--brand-orange: #fd7448;--brand-prussian: #1a3b53;--primary-background-light: rgb(var(--black) / 0.02);--primary-background: rgb(var(--black) / 0.03);--rounded-full: 12px;--rounded-lg: 12px;--rounded-md: 12px;--tw-ring-color: transparent !important}#navigation-items>.lg:mt-8{margin-top:1.5rem!important}.absolute>a,.absolute>a>div{border:0px!important;box-shadow:none!important}body{font-synthesis:none!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;text-rendering:optimizeLegibility!important}.font-medium{font-weight:600}h1,h2,h3,h4,h5,h6 *{color:var(--brand-black)!important}.prose{color:var(--brand-gray);--tw-prose-links: var(--brand-blue)}.prose a{border-bottom:1px solid rgb(var(--blue) / 0.2);outline-offset:2px}.prose h1.font-semibold,.prose h2.font-semibold,.prose h3.font-semibold,.prose h4.font-semibold,.prose h5.font-semibold,.prose h6.font-semibold{font-weight:700!important}#navigation-items a.text-primary{color:var(--brand-black)}#navigation-items a.text-primary:hover{color:var(--brand-black)}#navigation-items li>*{background-color:transparent!important;color:var(--brand-gray);padding-top:0.25rem;padding-bottom:0.25rem;--font-weight-body-custom: 500}#navigation-items li>*:focus,#navigation-items li>*:hover{color:rgb(var(--gray-700));background-color:transparent!important}#mobile-divider{display:none}.card{border-color:transparent!important;background-color:var(--primary-background-light);transition:all 0.15s cubic-bezier(0.4, 0, 0.2, 1)}a.card:hover{background-color:var(--primary-background);border-color:transparent!important}a.card:not([target=\"_blank\"]) .text-gray-400 svg{display:none}.hide-table-head+table>thead{display:none}div[id*=\"accordion\"]>table{margin-top:0px!important}.table-link-icons+table a{display:flex;align-items:center;border:none;gap:4px}.linked-address-container{display:flex;flex-direction:row;align-items:center;border:none;gap:8px;color:var(--brand-blue);justify-content:right}.inline-icons-container{display:flex;align-items:center;flex-direction:row;gap:4px}.icon-button{cursor:pointer;display:flex;border:none!important}.icon-button svg{background-color:var(--brand-gray)!important;-webkit-mask-position-x:left!important}.icon-button svg:hover{background-color:var(--brand-black)!important;transition:background-color 0.2s ease}table{width:100%!important;table-layout:auto!important;border-collapse:collapse}th:has(.xs-cell),td:has(.xscell){min-width:80px}th:has(.sm-cell),td:has(.sm-cell){min-width:120px}th:has(.md-cell),td:has(.md-cell){min-width:180px}th:has(.lg-cell),td:has(.lg-cell){min-width:240px}th:has(.grow-cell),td:has(.grow-cell){width:100%}th:has(.auto-cell),td:has(.auto-cell){width:auto!important}td[style*=\"text-align: right\"]>a{justify-content:right}button[aria-controls*=\"accordion\"]{transition:all 0.15s cubic-bezier(0.4, 0, 0.2, 1)}button[aria-controls*=\"accordion\"]:hover{background-color:var(--primary-background-light)}#navbar a[href=\"https://docs.loopscale.com\"]{display:flex;column-gap:0.5rem;align-items:center;padding-top:0.25rem}@media (min-width: 480px){#navbar a[href=\"https://docs.loopscale.com\"]::after{content:\"Documentation\";font-weight:600;font-size:0.875rem;line-height:1.25rem}}footer>:last-child{display:none}.nav-dropdown-item-icon{background-color:rgb(var(--blue) / 0.1);border:none!important}.tryit-button{background-color:var(--brand-blue)}.tryit-button>svg{mask-image:url(\"https://mintlify.b-cdn.net/v6.6.0/solid/arrow-right.svg\")!important;-webkit-mask-image:url(\"https://mintlify.b-cdn.net/v6.6.0/solid/arrow-right.svg\")!important}img{border-radius:24px}video{border-radius:4px}code,code>*>*{font-size:0.875rem;white-space:pre-wrap!important;word-break:break-word;max-width:100%!important}[data-component-part=code-block-root]:not(.has-line-numbers) .line-highlight{background-color:rgb(var(--blue) / 0.1)!important}#sidebar>div::-webkit-scrollbar,#table-of-contents-content::-webkit-scrollbar{display:none}#sidebar>div,#table-of-contents-content{-ms-overflow-style:none;scrollbar-width:none}"}],"page":{"pagePath":"api-reference/transactions/borrow/withdraw-collateral","slug":"/api-reference/transactions/borrow/withdraw-collateral","pageMetadata":{"title":"Withdraw collateral","openapi":"post /markets/creditbook/collateral/withdraw","description":"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.","href":"/api-reference/transactions/borrow/withdraw-collateral"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Withdraw collateral","openapi":"post /markets/creditbook/collateral/withdraw","description":"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.","href":"/api-reference/transactions/borrow/withdraw-collateral"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["creditbook"],"operationId":"query_withdraw_collateral","parameters":["2eed71d4-9443-4182-ab47-4ffe3cb5bf57","d7db584d-0b1c-4de8-b5cf-9af2ba7bba1b","e7685f5b-9a6a-4b1c-aae4-0c643567e64c","0b182f72-4d0e-4325-803e-3f702cec784e"],"requestBody":"cf16e12a-95a5-4521-a48e-3558ff3a72e0","responses":{"200":"430aa689-d36b-4e26-a6a7-8340b537cd67","400":"73878e1d-c96b-4948-9ddc-b8a59eccc57d","401":"69ce4fd2-fc9d-4ba5-8f91-307f66773211","409":"c6dbc6df-740d-4c11-bfae-8828770c28b8","500":"14558d58-9119-4b0b-b594-aa35b70f9f12"},"summary":"Withdraw collateral","description":"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.","method":"post","type":"path","servers":["6d48483c-242e-446e-9b4f-3a71c93db7d2"],"security":[],"path":"/markets/creditbook/collateral/withdraw","baseUrlOptions":["https://tars.loopscale.com/v1"],"title":"Withdraw collateral","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"2eed71d4-9443-4182-ab47-4ffe3cb5bf57":{"name":"User-Wallet","in":"header","description":"Base58 wallet of the acting user; the transaction is built for this wallet. Missing header returns 401","required":true,"schema":{"type":"string","isRequired":true,"description":"Base58 wallet of the acting user; the transaction is built for this wallet. Missing header returns 401","uniqueKey":"","typeLabel":"string"}},"d7db584d-0b1c-4de8-b5cf-9af2ba7bba1b":{"name":"payer","in":"header","description":"Base58 wallet that pays transaction fees; defaults to the `User-Wallet` wallet when omitted","required":false,"schema":{"oneOf":[{"type":"string","description":"Base58 wallet that pays transaction fees; defaults to the `User-Wallet` wallet when omitted","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","description":"Base58 wallet that pays transaction fees; defaults to the `User-Wallet` wallet when omitted","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}},"e7685f5b-9a6a-4b1c-aae4-0c643567e64c":{"name":"Transaction-Settings","in":"header","description":"Optional JSON-encoded transaction settings (priority-fee percentile, compute limits, simulation mode)","required":false,"schema":{"oneOf":[{"type":"string","description":"Optional JSON-encoded transaction settings (priority-fee percentile, compute limits, simulation mode)","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional JSON-encoded transaction settings (priority-fee percentile, compute limits, simulation mode)","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}},"0b182f72-4d0e-4325-803e-3f702cec784e":{"name":"Idempotent-Key","in":"header","description":"Optional idempotency key; a retried write with the same key replays the original response","required":false,"schema":{"oneOf":[{"type":"string","description":"Optional idempotency key; a retried write with the same key replays the original response","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional idempotency key; a retried write with the same key replays the original response","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["loan","collateralMint","amount","collateralIndex","expectedLoanValues"],"properties":{"amount":{"type":"integer","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"amount","typeLabel":"integer\u003cint64>"},"collateralIndex":{"type":"integer","format":"int32","minimum":0,"isRequired":true,"uniqueKey":"collateralIndex","typeLabel":"integer\u003cint32>"},"collateralMint":{"type":"string","isRequired":true,"uniqueKey":"collateralMint","typeLabel":"string"},"expectedLoanValues":{"type":"object","description":"Expected loan economics the borrower signs off on, checked on-chain against the\nfreshly-priced values to bound slippage.","required":["expectedApy","expectedLqt"],"properties":{"expectedApy":{"type":"integer","format":"int64","description":"Expected loan APY, in basis points of a hundredth (cbps).","minimum":0,"isRequired":true,"uniqueKey":"expectedLoanValues.expectedApy","typeLabel":"integer\u003cint64>"},"expectedLqt":{"type":"array","items":{"type":"integer","format":"int32","minimum":0,"uniqueKey":"expectedLoanValues.expectedLqt.items.[INDEX]","typeLabel":"integer\u003cint32>"},"description":"Expected per-ledger liquidation threshold, one entry per ledger slot.","isRequired":true,"uniqueKey":"expectedLoanValues.expectedLqt","typeLabel":"integer\u003cint32>[]"}},"isRequired":true,"uniqueKey":"expectedLoanValues","typeLabel":"object"},"loan":{"type":"string","isRequired":true,"uniqueKey":"loan","typeLabel":"string"},"assetIndexGuidance":{"type":"array","items":{"type":"integer","format":"int32","minimum":0,"uniqueKey":"assetIndexGuidance.items.[INDEX]","typeLabel":"integer\u003cint32>"},"description":"Per-collateral oracle asset-index guidance (one byte per collateral slot).","uniqueKey":"assetIndexGuidance","typeLabel":"integer\u003cint32>[]"},"lockLoan":{"type":"boolean","uniqueKey":"lockLoan","typeLabel":"boolean"},"skipClose":{"type":"boolean","uniqueKey":"skipClose","typeLabel":"boolean"},"stakeInstructions":{"oneOf":[{"type":"null","uniqueKey":"stakeInstructions.oneOf.0","typeLabel":"null"},{"type":"object","required":["vault","amount"],"properties":{"amount":{"type":"integer","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"stakeInstructions.oneOf.1.amount","typeLabel":"integer\u003cint64>"},"vault":{"type":"string","isRequired":true,"uniqueKey":"stakeInstructions.oneOf.1.vault","typeLabel":"string"},"stakeAccount":{"oneOf":[{"type":"string","uniqueKey":"stakeInstructions.oneOf.1.stakeAccount.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"stakeInstructions.oneOf.1.stakeAccount.oneOf.1","typeLabel":"null"}],"uniqueKey":"stakeInstructions.oneOf.1.stakeAccount","typeLabel":"string | null"}},"uniqueKey":"stakeInstructions.oneOf.1","typeLabel":"object"}],"uniqueKey":"stakeInstructions","typeLabel":"null | object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"amount":1,"collateralIndex":1,"collateralMint":"\u003cstring>","expectedLoanValues":{"expectedApy":1,"expectedLqt":[1]},"loan":"\u003cstring>","assetIndexGuidance":[1],"lockLoan":true,"skipClose":true,"stakeInstructions":{"amount":1,"vault":"\u003cstring>","stakeAccount":"\u003cstring>"}}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"430aa689-d36b-4e26-a6a7-8340b537cd67":{"description":"Serialized transaction for withdrawing collateral.","content":{"application/json":{"schema":{"type":"object","description":"versioned txn return","required":["message","signatures"],"properties":{"message":{"type":"string","description":"serialized message","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"signatures":{"type":"array","items":{"type":"object","description":"versioned txn return","required":["publicKey","signature"],"properties":{"publicKey":{"type":"string","description":"serialized message","isRequired":true,"uniqueKey":"signatures.items.[INDEX].publicKey","typeLabel":"string"},"signature":{"type":"string","description":"serialized signatures","isRequired":true,"uniqueKey":"signatures.items.[INDEX].signature","typeLabel":"string"}},"uniqueKey":"signatures.items.[INDEX]","typeLabel":"object"},"description":"serialized signatures","isRequired":true,"uniqueKey":"signatures","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","signatures":[{"publicKey":"\u003cstring>","signature":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"73878e1d-c96b-4948-9ddc-b8a59eccc57d":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","description":"Canonical error envelope for every endpoint. The `x-request-id` response\nheader carries the correlation id for the failing request.","required":["error"],"properties":{"error":{"type":"object","description":"error detail","required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code, mirrored in the response status line","example":400,"minimum":0,"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer\u003cint32>"},"message":{"type":"string","description":"human-readable, client-safe message (sensitive data redacted)","example":"Request could not be processed.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"simulation":{"oneOf":[{"type":"null","uniqueKey":"error.simulation.oneOf.0","typeLabel":"null"},{"type":"object","description":"Populated on transaction-generation endpoints when the build-path\nsimulation reverts. Absent on all other error paths.","required":["decoded","logs"],"properties":{"decoded":{"type":"string","description":"Human-readable decoded error (Anchor \"Error Message: ...\" when available,\notherwise the raw program error code or `TransactionError` debug form).","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.decoded","typeLabel":"string"},"logs":{"type":"array","items":{"type":"string","uniqueKey":"error.simulation.oneOf.1.logs.items.[INDEX]","typeLabel":"string"},"description":"Program logs from the reverting simulation, in order.","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.logs","typeLabel":"string[]"},"serializedTransaction":{"oneOf":[{"type":"string","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.0","typeLabel":"string"},{"type":"null","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.simulation.oneOf.1.serializedTransaction","typeLabel":"string | null"}},"uniqueKey":"error.simulation.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.simulation","typeLabel":"null | object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"Request could not be processed.","simulation":{"decoded":"\u003cstring>","logs":["\u003cstring>"],"serializedTransaction":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"69ce4fd2-fc9d-4ba5-8f91-307f66773211":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","description":"Canonical error envelope for every endpoint. The `x-request-id` response\nheader carries the correlation id for the failing request.","required":["error"],"properties":{"error":{"type":"object","description":"error detail","required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code, mirrored in the response status line","example":400,"minimum":0,"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer\u003cint32>"},"message":{"type":"string","description":"human-readable, client-safe message (sensitive data redacted)","example":"Request could not be processed.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"simulation":{"oneOf":[{"type":"null","uniqueKey":"error.simulation.oneOf.0","typeLabel":"null"},{"type":"object","description":"Populated on transaction-generation endpoints when the build-path\nsimulation reverts. Absent on all other error paths.","required":["decoded","logs"],"properties":{"decoded":{"type":"string","description":"Human-readable decoded error (Anchor \"Error Message: ...\" when available,\notherwise the raw program error code or `TransactionError` debug form).","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.decoded","typeLabel":"string"},"logs":{"type":"array","items":{"type":"string","uniqueKey":"error.simulation.oneOf.1.logs.items.[INDEX]","typeLabel":"string"},"description":"Program logs from the reverting simulation, in order.","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.logs","typeLabel":"string[]"},"serializedTransaction":{"oneOf":[{"type":"string","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.0","typeLabel":"string"},{"type":"null","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.simulation.oneOf.1.serializedTransaction","typeLabel":"string | null"}},"uniqueKey":"error.simulation.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.simulation","typeLabel":"null | object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"Request could not be processed.","simulation":{"decoded":"\u003cstring>","logs":["\u003cstring>"],"serializedTransaction":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"c6dbc6df-740d-4c11-bfae-8828770c28b8":{"description":"Idempotency-Key reused with a different request body","content":{"application/json":{"schema":{"type":"object","description":"Canonical error envelope for every endpoint. The `x-request-id` response\nheader carries the correlation id for the failing request.","required":["error"],"properties":{"error":{"type":"object","description":"error detail","required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code, mirrored in the response status line","example":400,"minimum":0,"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer\u003cint32>"},"message":{"type":"string","description":"human-readable, client-safe message (sensitive data redacted)","example":"Request could not be processed.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"simulation":{"oneOf":[{"type":"null","uniqueKey":"error.simulation.oneOf.0","typeLabel":"null"},{"type":"object","description":"Populated on transaction-generation endpoints when the build-path\nsimulation reverts. Absent on all other error paths.","required":["decoded","logs"],"properties":{"decoded":{"type":"string","description":"Human-readable decoded error (Anchor \"Error Message: ...\" when available,\notherwise the raw program error code or `TransactionError` debug form).","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.decoded","typeLabel":"string"},"logs":{"type":"array","items":{"type":"string","uniqueKey":"error.simulation.oneOf.1.logs.items.[INDEX]","typeLabel":"string"},"description":"Program logs from the reverting simulation, in order.","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.logs","typeLabel":"string[]"},"serializedTransaction":{"oneOf":[{"type":"string","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.0","typeLabel":"string"},{"type":"null","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.simulation.oneOf.1.serializedTransaction","typeLabel":"string | null"}},"uniqueKey":"error.simulation.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.simulation","typeLabel":"null | object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"Request could not be processed.","simulation":{"decoded":"\u003cstring>","logs":["\u003cstring>"],"serializedTransaction":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"14558d58-9119-4b0b-b594-aa35b70f9f12":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","description":"Canonical error envelope for every endpoint. The `x-request-id` response\nheader carries the correlation id for the failing request.","required":["error"],"properties":{"error":{"type":"object","description":"error detail","required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"HTTP status code, mirrored in the response status line","example":400,"minimum":0,"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer\u003cint32>"},"message":{"type":"string","description":"human-readable, client-safe message (sensitive data redacted)","example":"Request could not be processed.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"simulation":{"oneOf":[{"type":"null","uniqueKey":"error.simulation.oneOf.0","typeLabel":"null"},{"type":"object","description":"Populated on transaction-generation endpoints when the build-path\nsimulation reverts. Absent on all other error paths.","required":["decoded","logs"],"properties":{"decoded":{"type":"string","description":"Human-readable decoded error (Anchor \"Error Message: ...\" when available,\notherwise the raw program error code or `TransactionError` debug form).","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.decoded","typeLabel":"string"},"logs":{"type":"array","items":{"type":"string","uniqueKey":"error.simulation.oneOf.1.logs.items.[INDEX]","typeLabel":"string"},"description":"Program logs from the reverting simulation, in order.","isRequired":true,"uniqueKey":"error.simulation.oneOf.1.logs","typeLabel":"string[]"},"serializedTransaction":{"oneOf":[{"type":"string","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.0","typeLabel":"string"},{"type":"null","description":"Base64-encoded, bincode-serialized `VersionedTransaction` that was\nsimulated (signatures zeroed for sig-verify-disabled simulation).\nDecode with `bincode::deserialize::\u003cVersionedTransaction>(\u0026base64_decode(..))`.","uniqueKey":"error.simulation.oneOf.1.serializedTransaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.simulation.oneOf.1.serializedTransaction","typeLabel":"string | null"}},"uniqueKey":"error.simulation.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.simulation","typeLabel":"null | object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"Request could not be processed.","simulation":{"decoded":"\u003cstring>","logs":["\u003cstring>"],"serializedTransaction":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"6d48483c-242e-446e-9b4f-3a71c93db7d2":{"url":"https://tars.loopscale.com/v1","description":"Loopscale Production Server"}}},"originalFileLocation":"api-reference/transactions/borrow/borrow.json"},"subdomain":"loopscale-docs","siteName":"Loopscale Docs","title":"Withdraw collateral - Loopscale Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-02T10:50:26.768Z","originalFileLocation":"api-reference/transactions/borrow/withdraw-collateral.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Loopscale Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Withdraw collateral - Loopscale Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Loopscale Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://loopscale-docs.mintlify.site/_mintlify/api/og/v2?division=Borrowing\u0026amp;title=Withdraw+collateral\u0026amp;description=Withdraws+collateral+from+an+existing+loan.+Full+collateral+removal+may+include+internal+weight-matrix+and+loan-lock+handling+before+the+transaction+is+returned\u0026amp;theme=f0d2584f2f06b8534c61dcb3\u0026amp;signature=e77e2b5efc803bf3050baa7ec0c446d243dfb33ed112b68194cb0e555a67c621\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Withdraw collateral - Loopscale Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://loopscale-docs.mintlify.site/_mintlify/api/og/v2?division=Borrowing\u0026amp;title=Withdraw+collateral\u0026amp;description=Withdraws+collateral+from+an+existing+loan.+Full+collateral+removal+may+include+internal+weight-matrix+and+loan-lock+handling+before+the+transaction+is+returned\u0026amp;theme=f0d2584f2f06b8534c61dcb3\u0026amp;signature=e77e2b5efc803bf3050baa7ec0c446d243dfb33ed112b68194cb0e555a67c621\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/loopscale-docs/BVOHXLnmyKFZRAaO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Loopscale Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#276ED6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/transactions/borrow/withdraw-collateral.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.loopscale.com/#organization\",\"name\":\"Loopscale Docs\",\"url\":\"https://docs.loopscale.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/loopscale-docs/7wEScHg4Gg_v9bhc/static/assets/logo/light.svg?fit=max\u0026auto=format\u0026n=7wEScHg4Gg_v9bhc\u0026q=85\u0026s=e3d7a3c8bd59969d54c957404dcb2ca9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.loopscale.com#website\",\"name\":\"Loopscale Docs\",\"url\":\"https://docs.loopscale.com\",\"publisher\":{\"@id\":\"https://docs.loopscale.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral#webpage\",\"url\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral\",\"name\":\"Withdraw collateral\",\"description\":\"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.\",\"dateModified\":\"2026-10-02T10:50:26.768Z\",\"isPartOf\":{\"@id\":\"https://docs.loopscale.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Transaction Endpoints\",\"item\":\"https://docs.loopscale.com/api-reference/transactions/borrow/create-loan\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Borrowing\",\"item\":\"https://docs.loopscale.com/api-reference/transactions/borrow/create-loan\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Withdraw collateral\",\"item\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral#apireference\",\"headline\":\"Withdraw collateral\",\"name\":\"Withdraw collateral\",\"description\":\"Withdraws collateral from an existing loan. Full collateral removal may include internal weight-matrix and loan-lock handling before the transaction is returned.\",\"url\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral\",\"mainEntityOfPage\":{\"@id\":\"https://docs.loopscale.com/api-reference/transactions/borrow/withdraw-collateral#webpage\"},\"dateModified\":\"2026-10-02T10:50:26.768Z\",\"publisher\":{\"@id\":\"https://docs.loopscale.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.loopscale.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Loopscale Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Loopscale Docs","nav":{"global":null,"dropdowns":[{"dropdown":"Product Docs","icon":{"style":"duotone","name":"book-open"},"description":"Understand the core concepts","groups":[{"group":"Introduction","pages":[{"title":"Loopscale Documentation","sidebarTitle":"Overview","icon":"rectangle-history","iconType":"duotone","mode":"wide","href":"/introduction/overview"},{"title":"Why Loopscale?","icon":"stars","iconType":"duotone","href":"/introduction/why-loopscale"}]},{"group":"Using Loopscale","pages":[{"group":"Lend","icon":{"style":"duotone","name":"chart-line"},"pages":[{"title":"Lend with Loopscale Vaults","sidebarTitle":"Lend with Vaults","icon":"square-bolt","iconType":"duotone","href":"/using-loopscale/lend/lend"},{"title":"Advanced Lending","icon":"gears","iconType":"duotone","href":"/using-loopscale/lend/advanced-lend"}]},{"title":"Earn Vaults","sidebarTitle":"Earn","icon":"vault","iconType":"duotone","href":"/using-loopscale/earn-vaults"},{"title":"Loop","icon":"circles-overlap","iconType":"duotone","href":"/using-loopscale/loop"},{"group":"Borrow","icon":{"style":"duotone","name":"money-simple-from-bracket"},"pages":[{"title":"Borrow on Loopscale Markets","sidebarTitle":"Overview","icon":"money-check-dollar","iconType":"duotone","href":"/using-loopscale/borrow/overview"},{"title":"Health \u0026 Liquidations","icon":"heart-pulse","iconType":"duotone","href":"/using-loopscale/borrow/health-and-liquidations"},{"title":"Refinancing","icon":"arrows-rotate","iconType":"duotone","href":"/using-loopscale/borrow/refinances"},{"title":"LP Collateral Management","icon":"droplet-percent","iconType":"duotone","href":"/using-loopscale/borrow/lp-collateral-management"}]},{"title":"Points on Loopscale","sidebarTitle":"Points","icon":"sparkle","iconType":"duotone","href":"/using-loopscale/points"}]},{"group":"Protocol Concepts","pages":[{"title":"Overview","icon":"shapes","iconType":"duotone","mode":"wide","href":"/protocol-concepts/overview"},{"title":"Loans \u0026 Orders","icon":"arrows-to-dotted-line","href":"/protocol-concepts/loans-and-orders"},{"title":"Credit Order Book","icon":"chart-simple-horizontal","iconType":"duotone","href":"/protocol-concepts/credit-order-book"},{"title":"Loopscale Vaults","icon":"diagram-nested","iconType":"duotone","href":"/protocol-concepts/loopscale-vaults"},{"title":"Earn Vault Architecture","sidebarTitle":"Earn Vault Architecture","icon":"sitemap","iconType":"duotone","href":"/protocol-concepts/earn-vault-architecture"},{"title":"Earn Vault Flows","sidebarTitle":"Earn Vault Flows","icon":"arrows-split-up-and-left","iconType":"duotone","href":"/protocol-concepts/earn-vault-flows"},{"title":"Loops","icon":"circle-dot","iconType":"duotone","href":"/protocol-concepts/loops"}]},{"group":"Resources","pages":[{"title":"Risks \u0026 Security","icon":"shield-quartered","iconType":"duotone","href":"/resources/risks-and-security"},{"title":"Assets and Oracles","mode":"wide","icon":"gears","iconType":"duotone","href":"/resources/asset-parameters"},{"title":"Addresses","mode":"wide","icon":"wallet","iconType":"duotone","href":"/resources/addresses"},{"title":"FAQ","icon":"comment-question","iconType":"duotone","mode":"wide","href":"/resources/faq"},{"title":"Formation","icon":{"name":"hands-helping","style":"regular","library":"fontawesome"},"href":"/resources/formation"},{"title":"Audits \u0026 Bug Bounty","mode":"wide","icon":"badge-check","iconType":"duotone","href":"/resources/audits"},{"title":"Brand Kit","url":"https://drive.google.com/drive/folders/1IYXgQ-Ihyb19dvGF1wfn1Qfjd4e4Kom5?usp=sharing","icon":"palette","iconType":"duotone","href":"/resources/brand-kit"},{"group":"Disclaimer \u0026 Terms","icon":{"style":"duotone","name":"clipboard-question"},"pages":[{"title":"Terms of Use","href":"/resources/terms"},{"title":"Privacy Policy","href":"/resources/privacy"},{"title":"Disclaimer","href":"/resources/disclaimer"}]}]}]},{"dropdown":"API Reference","icon":{"style":"duotone","name":"square-terminal"},"description":"Integrate the Loopscale protocol","groups":[{"group":"Getting Started","pages":[{"title":"Loopscale API","sidebarTitle":"Introduction","icon":"circle-info","iconType":"duotone","mode":"wide","href":"/api-reference/introduction/introduction"}]},{"group":"Transaction Endpoints","pages":[{"group":"Borrowing","icon":{"style":"duotone","name":"money-simple-from-bracket"},"pages":[{"title":"Create loan","openapi":"post /markets/creditbook/create","href":"/api-reference/transactions/borrow/create-loan"},{"title":"Borrow principal","openapi":"post /markets/creditbook/borrow","href":"/api-reference/transactions/borrow/borrow-principal"},{"title":"Flash borrow","openapi":"post /markets/creditbook/flash_borrow","href":"/api-reference/transactions/borrow/flash-borrow"},{"title":"Build loan","openapi":"post /markets/creditbook/build","href":"/api-reference/transactions/borrow/build-loan"},{"title":"Repay loan","openapi":"post /markets/creditbook/repay","href":"/api-reference/transactions/borrow/repay-loan"},{"title":"Simple repay loan","openapi":"post /markets/creditbook/repay_simple","href":"/api-reference/transactions/borrow/simple-repay-loan"},{"title":"Deposit collateral","openapi":"post /markets/creditbook/collateral/deposit","description":"Adds more collateral to an existing loan position.","href":"/api-reference/transactions/borrow/deposit-collateral"},{"title":"Withdraw collateral","openapi":"post /markets/creditbook/collateral/withdraw","href":"/api-reference/transactions/borrow/withdraw-collateral"},{"title":"Swap collateral","openapi":"post /markets/creditbook/swap_collateral","description":"Enables safe rebalancing of collateral by withdrawing a selected asset, executing CPIs (e.g. swaps or liquidity provision), and depositing a new asset in its place.","href":"/api-reference/transactions/borrow/swap-collateral"},{"title":"Refinance loan","openapi":"post /markets/creditbook/refinance","href":"/api-reference/transactions/borrow/refinance-loan"},{"title":"Sell ledger","openapi":"post /markets/creditbook/sell","href":"/api-reference/transactions/borrow/sell-ledger"},{"title":"Close loan","openapi":"post /markets/creditbook/close_loan","href":"/api-reference/transactions/borrow/close-loan"}]},{"group":"LP Collateral Management","icon":{"style":"duotone","name":"chart-candlestick"},"pages":[{"title":"Claim Orca fees","openapi":"post /markets/creditbook/collateral/orca/claim_fees","href":"/api-reference/transactions/clmm/claim-orca-fees"},{"title":"Update Orca liquidity","openapi":"post /markets/creditbook/collateral/orca/update_liquidity","href":"/api-reference/transactions/clmm/update-orca-liquidity"},{"title":"Transfer Orca position","openapi":"post /markets/creditbook/collateral/orca/transfer_position","href":"/api-reference/transactions/clmm/transfer-orca-position"},{"title":"Update Raydium liquidity","openapi":"post /markets/creditbook/collateral/raydium/update_liquidity","href":"/api-reference/transactions/clmm/update-raydium-liquidity"},{"title":"Transfer Raydium position","openapi":"post /markets/creditbook/collateral/raydium/transfer_position","href":"/api-reference/transactions/clmm/transfer-raydium-position"}]},{"group":"Loopscale Vaults","icon":{"style":"duotone","name":"money-simple-from-bracket"},"pages":[{"title":"Deposit to Vault","sidebarTitle":"Deposit to Vault","openapi":"post /markets/lending_vaults/deposit","href":"/api-reference/transactions/vault/deposit"},{"title":"Withdraw from Vault","sidebarTitle":"Withdraw from Vault","openapi":"post /markets/lending_vaults/withdraw","href":"/api-reference/transactions/vault/withdraw"},{"title":"Claim Vault rewards","sidebarTitle":"Claim Vault rewards","openapi":"post /markets/lending_vaults/rewards/claim","href":"/api-reference/transactions/vault/claim-rewards"}]},{"group":"Earn Vaults","icon":{"style":"duotone","name":"vault"},"pages":[{"title":"Acknowledge Earn Vault","sidebarTitle":"Acknowledge Earn Vault","openapi":"post /markets/earn/vaults/acknowledge","href":"/api-reference/transactions/earn/acknowledge"},{"title":"Deposit to Earn Vault","sidebarTitle":"Deposit","api":"POST https://tars.loopscale.com/v1/pandora/earn/vaults/deposit/tx","href":"/api-reference/transactions/earn/deposit"},{"title":"Withdraw from Earn Vault","sidebarTitle":"Withdraw","api":"POST https://tars.loopscale.com/v1/pandora/earn/vaults/withdraw_request/tx","href":"/api-reference/transactions/earn/withdraw-request"},{"title":"Claim Earn Withdrawal","sidebarTitle":"Claim Withdrawal","api":"POST https://tars.loopscale.com/v1/pandora/earn/vaults/withdraw_claim/tx","href":"/api-reference/transactions/earn/claim-withdrawal"},{"title":"Cancel Earn Withdrawal","sidebarTitle":"Cancel Withdrawal","api":"POST https://tars.loopscale.com/v1/pandora/earn/vaults/withdraw_cancel/tx","href":"/api-reference/transactions/earn/cancel-withdrawal"}]},{"group":"Strategy","icon":{"style":"duotone","name":"chart-pie"},"pages":[{"title":"Create strategy","openapi":"post /markets/strategy/create","href":"/api-reference/transactions/strategy/create-strategy"},{"title":"Deposit into strategy","openapi":"post /markets/strategy/deposit","href":"/api-reference/transactions/strategy/deposit-strategy"},{"title":"Withdraw from strategy","openapi":"post /markets/strategy/withdraw","href":"/api-reference/transactions/strategy/withdraw-strategy"},{"title":"Update strategy","openapi":"post /markets/strategy/update","href":"/api-reference/transactions/strategy/update-strategy"},{"title":"Close strategy","openapi":"post /markets/strategy/close/{strategy}","href":"/api-reference/transactions/strategy/close-strategy"}]},{"group":"Curation","icon":{"style":"duotone","name":"money-simple-from-bracket"},"pages":[{"title":"Edit vault deposits","openapi":"post /markets/lending_vaults/deposits/edit","href":"/api-reference/transactions/vault/edit-deposits"},{"title":"Create vault timelocks","openapi":"post /markets/lending_vaults/timelock/create","href":"/api-reference/transactions/vault/create-timelocks"},{"title":"Cancel vault timelocks","openapi":"post /markets/lending_vaults/timelock/cancel","href":"/api-reference/transactions/vault/cancel-timelocks"},{"title":"Create rewards schedule","openapi":"post /markets/lending_vaults/rewards/schedule/create","href":"/api-reference/transactions/vault/create-rewards-schedule"},{"title":"Edit rewards schedule","openapi":"post /markets/lending_vaults/rewards/schedule/edit","href":"/api-reference/transactions/vault/edit-rewards-schedule"}]}]},{"group":"Data Endpoints","pages":[{"group":"Markets","icon":{"style":"duotone","name":"chart-candlestick"},"pages":[{"title":"Get quotes","openapi":"post /markets/quote","href":"/api-reference/data/markets/get-quotes"},{"title":"Get best quote","openapi":"post /markets/quote/max","href":"/api-reference/data/markets/get-best-quote"}]},{"group":"Positions","icon":{"style":"duotone","name":"chart-pie"},"pages":[{"title":"Get loan info","openapi":"post /markets/loans/info","href":"/api-reference/data/positions/get-loan-info"}]},{"group":"Loops","icon":{"style":"duotone","name":"chart-line"},"pages":[{"title":"Get Loop info","openapi":"post /markets/loop/info","href":"/api-reference/data/loops/get-loop-info"}]},{"group":"Vaults","icon":{"style":"duotone","name":"chart-candlestick"},"pages":[{"title":"Get Vaults","openapi":"post /markets/lending_vaults/info","href":"/api-reference/data/vaults/get-vaults"},{"title":"Get Vault depositors","openapi":"post /markets/lending_vaults/deposits","href":"/api-reference/data/user/get-vault-depositors"}]},{"group":"Earn Vaults","icon":{"style":"duotone","name":"vault"},"pages":[{"title":"Get Earn Vaults","sidebarTitle":"Get Earn Vaults","openapi":"get /markets/earn/vaults","href":"/api-reference/data/earn/get-earn-vaults"},{"title":"Get Earn Vault","sidebarTitle":"Get Earn Vault","openapi":"get /markets/earn/vaults/{address}","href":"/api-reference/data/earn/get-earn-vault"},{"title":"Get Earn Vault History","sidebarTitle":"Get Earn Vault History","openapi":"post /markets/earn/vaults/history","href":"/api-reference/data/earn/get-earn-vault-history"},{"title":"Get Earn Position","sidebarTitle":"Get Earn Position","openapi":"post /markets/earn/vaults/positions","href":"/api-reference/data/earn/get-earn-position"},{"title":"Get Earn Portfolio","sidebarTitle":"Get Earn Portfolio","openapi":"post /markets/earn/portfolio/positions","href":"/api-reference/data/earn/get-earn-portfolio"},{"title":"Get Earn Withdrawal Queue","sidebarTitle":"Get Earn Withdrawal Queue","openapi":"post /markets/earn/vaults/queue","href":"/api-reference/data/earn/get-earn-withdrawal-queue"}]},{"group":"Strategies","icon":{"style":"duotone","name":"chart-pie"},"pages":[{"title":"Get strategies","openapi":"post /markets/strategy/infos","href":"/api-reference/data/strategies/get-strategies"}]},{"group":"Users","icon":{"style":"duotone","name":"users"},"pages":[{"title":"Get collateral holders","openapi":"post /markets/collateral/holders","href":"/api-reference/data/user/get-collateral-holders"},{"title":"Get historical collateral holders","openapi":"post /markets/collateral/holders/historical","href":"/api-reference/data/user/get-historical-collateral-holders"},{"title":"Get Vault depositors","openapi":"post /markets/lending_vaults/deposits","href":"/api-reference/data/user/get-vault-depositors"}]}]},{"group":"Guides","pages":[{"title":"Calculate Vault \u0026 Loop Metrics","sidebarTitle":"Vault \u0026 Loop Metrics","icon":"calculator","iconType":"duotone","href":"/api-reference/guides/vault-and-loop-metrics"},{"title":"Integrate Earn Vaults","sidebarTitle":"Earn Vaults","icon":"vault","iconType":"duotone","href":"/api-reference/guides/earn-integration"}]}]},{"dropdown":"Partners","icon":{"style":"duotone","name":"arrow-up-right-dots"},"description":"Scale assets and markets","groups":[{"group":"For Issuers","pages":[{"title":"How Loopscale Works","icon":"circle-info","iconType":"duotone","href":"/partners/issuers/how-loopscale-works"},{"title":"Integration Types","icon":"link","iconType":"duotone","href":"/partners/issuers/integrate"},{"title":"Real-World Assets","icon":"building-columns","iconType":"duotone","href":"/partners/issuers/rwa"}]},{"group":"For Vault Curators","pages":[{"title":"Loopscale Vault Curation","sidebarTitle":"Curation","icon":"money-bill-transfer","iconType":"duotone","href":"/partners/curators/curation"},{"title":"Vault Manager UI Guide","sidebarTitle":"Vault Manager UI","icon":"browser","iconType":"duotone","href":"/partners/curators/vault-manager-ui"},{"title":"Loopscale Vault Architecture","sidebarTitle":"Vault Architecture","icon":"diagram-subtask","iconType":"duotone","href":"/partners/curators/vault-architecture"},{"title":"Security at Loopscale","sidebarTitle":"Security","icon":"shield-halved","iconType":"duotone","href":"/partners/curators/security"}]},{"group":"Guides","pages":[{"group":"Loopscale Vaults","pages":[{"title":"Deposit to Loopscale Vaults","sidebarTitle":"Deposit","icon":"chart-line","iconType":"duotone","href":"/partners/guides/deposit"},{"title":"Withdraw from Loopscale Vaults","sidebarTitle":"Withdraw","icon":"right-from-bracket","iconType":"duotone","href":"/partners/guides/withdraw"},{"title":"Manage Loopscale Vault Position","sidebarTitle":"Manage Position","icon":"gears","iconType":"duotone","href":"/partners/guides/manage"}]}]}]}]},"basePath":"","title":"Withdraw collateral - Loopscale Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}