Split Delegations
If you have a stake account with a large balance, you can split it into multiple accounts. This is useful for partial withdrawals.
Send the following request to our API:
curl -X POST \
'https://api.stake.fish/v1/solana/delegations/split' \
-H 'Content-Type: application/json' \
-H 'Authorization: YOUR_PUBLIC_API_KEY' \
-d '{
"stakeAuthorityPubkey": "STAKE_AUTHORITY_PUBKEY",
"stakeAccountPubkey": "STAKE_ACCOUNT_PUBKEY",
"splitAmount": "SPLIT_AMOUNT_IN_LAMPORTS"
}'
ImportantThis API requires Public API Key.
Required Fields:
stakeAuthorityPubkey: The public key that controls the stake accountsstakeAccountPubkey: The existing stake account to splitsplitAmount: The amount to split into the new account (in lamports)
Optional Fields:
fromPubkey: The public key that will sign and fund the transaction- Defaults to
stakeAuthorityPubkey
- Defaults to
Example Request Body:
{
"stakeAuthorityPubkey": "Aby8zv8WueGgQgqvBSMdifCGr1MXEFUhYXTEhbs2ChyE",
"stakeAccountPubkey": "7VGU4ZwR1e1AFekqbqv2gvjeg47e1PwMPm4BfLt6rxNk",
"splitAmount": "10000000",
"fromPubkey": "7VGU4ZwR1e1AFekqbqv2gvjeg47e1PwMPm4BfLt6rxNk"
}Example Response:
{
"serializedTransaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgADBeoOx6fJLnceFv4CZ68u1zUB6f9k2fwkIAsA6ZRZ3KQUR9zlUhDKVJWQw7kjNt7wNP9oGHdZy8toGmBr4pT"
}Sign & Broadcast Transaction
Once the split transaction is prepared by our API, the final step is to sign and broadcast it.
Sign the Transaction
Rehydrate the serialized transaction from the Base64 encoded string.
Use the account corresponding to the fromPubkey (defaults to stakeAuthorityPubkey) to sign the transaction.
Send the Transaction
Broadcast the signed transaction to a Solana node. Once confirmed, the specified amount will be split into a new stake account.
Updated 21 days ago
