Loop
Leverage, close, collateral-swap, debt-swap
📄️ Leverage (loop)
Open a leveraged position via borrow → swap → deposit. Identify the debt market with `marketUidIn` and collateral market with `marketUidOut`. Omit `account` for quote-only. Include `account` to build full transaction calldata.
📄️ Leverage (loop) with simulation
Open a leveraged position and simulate post-trade state. Same parameters as GET. Send a JSON body with current portfolio state (`balanceData`, `aprData`) to receive projected post-trade metrics in the `simulation` field.
📄️ Close margin position
Close a leveraged position. Identify the collateral market with `marketUidIn` and debt market with `marketUidOut`. Omit `account` for quote-only. Include `account` to build full transaction calldata.
📄️ Close margin position with simulation
Close a leveraged position and simulate post-trade state. Same parameters as GET. Send a JSON body with current portfolio state (`balanceData`, `aprData`) to receive projected post-trade metrics in the `simulation` field.
📄️ Collateral swap
Swap collateral assets within a lending position. Identify the sell-side collateral market with `marketUidIn` and buy-side with `marketUidOut`. Omit `account` for quote-only. Include `account` to build full transaction calldata.
📄️ Collateral swap with simulation
Swap collateral assets and simulate post-trade state. Same parameters as GET. Send a JSON body with current portfolio state (`balanceData`, `aprData`) to receive projected post-trade metrics in the `simulation` field.
📄️ Debt swap
Swap debt between different borrow positions. Identify the repay-side debt market with `marketUidIn` and borrow-side with `marketUidOut`. Omit `account` for quote-only. Include `account` to build full transaction calldata.
📄️ Debt swap with simulation
Swap debt between borrow positions and simulate post-trade state. Same parameters as GET. Send a JSON body with current portfolio state (`balanceData`, `aprData`) to receive projected post-trade metrics in the `simulation` field.