Skip to main content

Lending (Actions)

Deposit, withdraw, borrow, repay, e-mode, enable-collateral

📄️ Deposit (simulate)

Build calldata for depositing into a lending pool and simulate post-trade state. Same parameters as GET. Optionally send a JSON body with current portfolio state (`balanceData`, `aprData`, `positions`) to receive projected post-trade metrics in the `simulation` field — if omitted, the API fetches balances on-chain automatically. Use the data returned by the user-data endpoints directly — always include `positions` for accurate health-factor and borrow-capacity projections.

📄️ Withdraw (simulate)

Build calldata for withdrawing from a lending pool and simulate post-trade state. Same parameters as GET. Optionally send a JSON body with current portfolio state (`balanceData`, `aprData`, `positions`) to receive projected post-trade metrics in the `simulation` field — if omitted, the API fetches balances on-chain automatically. Use the data returned by the user-data endpoints directly — always include `positions` for accurate health-factor and borrow-capacity projections.

📄️ Borrow (simulate)

Build calldata for borrowing from a lending pool and simulate post-trade state. Same parameters as GET. Optionally send a JSON body with current portfolio state (`balanceData`, `aprData`, `positions`) to receive projected post-trade metrics in the `simulation` field — if omitted, the API fetches balances on-chain automatically. Use the data returned by the user-data endpoints directly — always include `positions` for accurate health-factor and borrow-capacity projections.