Skip to main content
Closes a native stake account that has reached inactive state. The companion to /api/v1/unstake for sol-native-stake deactivate flows: deactivate begins the cooldown, this completes the unstake once the deactivation epoch has passed. By default, withdraws all lamports back to the wallet (closing the account). Pass lamports for a partial drain.

Lifecycle

The on-chain stake program enforces step 3. StakeProgram.withdraw rejects with insufficient funds for instruction if you call it before currentEpoch > deactivationEpoch. Do not poll faster than once per epoch.

Request


Response

The wallet (withdrawer authority) is the only required signer. Broadcast via route: "rpc" — there is no Sanctum or Voltr involvement.

Errors

Common upstream error: “insufficient funds for instruction”

Returned at broadcast time when the stake account has not yet reached inactive. Wait until the on-chain epoch is strictly greater than the account’s deactivationEpoch and try again. The Solana CLI’s solana stakes “Inactive Stake: X SOL” line is misleading — it shows the unlocked portion, not the account state. The on-chain rule is what matters: an account is inactive when currentEpoch > deactivationEpoch.

See also

POST /unstake

Begin deactivation (kind=deactivate).

POST /broadcast

Submit the signed withdraw.