Function dflow_sdk::client::instructions::close_retail_account
source · [−]pub fn close_retail_account(
program: &Program,
retail_data_account: Pubkey,
retail_account_owner: Pubkey
) -> Instruction
Expand description
This instruction closes the retail trader’s data account.
When retail traders wish to close their account, and regain the lamports used to allocate the space for their data account, they can call this instruction. Retail traders may not close their account if they have open orders, and must wait for the orders to be filled, or cancel them.
Arguments
retail_data_account
The retail data account holds state specific to the retail trader. This account is being closed, and the destination of the lamports will be the retail_account_owner account. This account is expected to be mutableretail_account_owner
The public key of the retail trader. This account is a signer for the instruction. This account is expected to be mutable
Returns an instruction