Function jet_margin::jet_margin::close_account
source · [−]pub fn close_account(
ctx: Context<'_, '_, '_, '_, CloseAccount<'_>>
) -> Result<()>
Expand description
Close a user’s margin account
The margin account must have zero positions remaining to be closed.
Accounts
Name | Type | Description |
owner | signer | The owner of the account being closed. |
receiver | writable | The account to get any returned rent. |
margin_account | writable | The account being closed. |
Events
Event Name | Description |
events::AccountClosed | Marks the closure of the account. |