Core Integartion
Withdrawing Assets
Queue and complete lending pool withdrawals
Withdrawals are a two-step process: Queue -> Complete.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Queue and complete lending pool withdrawals
const amountToWithdraw = 50;
const txQueue = await sdk.queueWithdraw(usdcAddress, amountToWithdraw);
console.log("Withdrawal queued:", txQueue);
// 1. Find approved withdrawal requests
const transactions = await sdk.getTransactions({
type: "withdraw",
status: "approved"
});
// 2. Complete them
for (const tx of transactions.data) {
if (tx.platform === "lending-pool") {
console.log(`Completing withdrawal for ${tx.amount} ${tx.asset}...`);
const txComplete = await sdk.completeWithdraw(
tx.asset as Address,
tx.requestId!
);
console.log("Withdrawal completed:", txComplete);
}
}