> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solana.vanna.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Open Account

> Create the per-wallet margin PDA. Required once.

The first margin action creates `MarginAccount` at `["margin", your_wallet]`.

## Steps

1. Connect a wallet.
2. Open **Perps**, **Farm**, or a margin deposit screen.
3. If no account exists, the app sends `user_create_margin`.
4. Wait for confirmation. Later visits rediscover the same PDA.

You cannot create a second account for the same wallet. Closing requires zero collateral, zero debt, and no Lite positions (`user_close_margin`).
