Margin Accounts
The margin account is the sole account that tracks all of a user's state across the exchange. There is one account, called a CrossMarginAccount, for all assets. That means you only have to deposit/withdraw once to have access to all markets.
This account stores all the necessary details for the user state bookkeeping including:
Balance
Open orders
Positions
Cost of trades
Trading fees
Funding payments
For a more detailed overview, have a look at the SDK documentation which discusses the account structure in more depth.
A user margin account is atomically created on deposit of USDC to the platform. There is a one time cost of ~0.01 SOL, returned when an account is closed.
Last updated