Skip to main content
Reads a wallet’s leverage positions — and, on Robinhood Chain, its open stock + yield equity vaults — directly from chain state (read-only).

Input

string
required
Wallet address to read positions for.
integer
default:"1"

Output

Each position carries:

Exit health (per position)

Closing swaps the full leveraged collateral, so exit health is measured against the whole position — not your equity:
Poll this on open positions. A market can be deep while your position still exceeds the depth that exits cleanly — exceedsCleanExitSize: true means expect slippage on close. If a route disappears entirely, you can still exit in-kind (repay + remove_collateral need no swap) — see Oracle & exit liquidity.

Example

Equity vaults (equityPositions)

A vault is two legs the user holds directly: the stock as their own Morpho collateral with USDG debt, and the Spiral yield loop that debt funds. get_positions re-assembles them and removes the vault’s yield loop(s) from positions. yieldLoopMatch says how the loop was attributed:
A vault’s yield loop cannot be managed alone: build_manage_tx refuses every action on it, because closing it by itself would leave the stock leg standing with its debt. Unwind the whole vault with build_equity_exit_tx.
No cost-basis or realized P&L — those require off-chain history. Positions are read live from chain and returned newest-first.