Solana Staking
Instructions: https://help.allnodes.com/en/articles/6612209-solana-staking-api
Get stake accounts
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get list of all your stake accounts.
Headers
Authorization*
string
Bearer TOKEN
Request Body
currencySymbol*
string
Must be "SOL"
action*
string
Must be "get-stake-accounts"
address*
string
Your wallet address
[
{
publicKey: string;
rentEpoch: number;
lamports: number;
stake: number;
validatorPublicKey: string | null;
status: {
active: number;
inactive: number;
state: 'active' | 'inactive' | 'activating' | 'deactivating';
};
}
]
Create stake account
POST
http://www.allnodes.com/api/v1/staking
This endpoint allows you to get serialized unsigned transaction for creating stake account.
Headers
Authorization*
string
Bearer TOKEN
Request Body
currencySymbol*
string
Must be "SOL"
action*
string
Must be "create-stake-account"
address*
string
Your wallet address
amount*
string
Amount to stake
{
network: string;
amount: string;
serializedTransaction: string;
stakeAccountSecretKey: string;
stakeAccountPublicKey: string;
}
Stake coins
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get serialized unsigned transaction for delegating staked coins to Allnodes validator.
Headers
Authorization*
string
Bearer TOKEN
Request Body
currencySymbol*
string
Must be "SOL"
action*
string
Must be "stake"
address*
string
Your wallet address
stakeAccountPublicKey*
string
Public key of your stake account. Public key can be extracted from "Create stake account" call
{
network: string;
votePublicKey: string;
serializedTransaction: string;
}
Unbond coins
POST
http://www.allnodes.com/api/v1/staking
This endpoint allows you to get serialized unsigned transaction for unbonding coins (deactivating your stake account).
Headers
Authorization*
string
Bearer TOKEN
Request Body
currencySymbol*
string
Must be "SOL"
action*
string
Must be "unbond-stake"
address*
string
Your wallet address
stakeAccountPublicKey*
string
Public key of your stake account. Public key can be extracted from "Create stake account" call
{
network: string;
serializedTransaction: string;
}
Withdraw stake (after unbonding period finished)
POST
https://www.allnodes.com/api/v1/staking
This endpoint allows you to get serialized unsigned transaction for withdraw stake.
Headers
Authorization*
string
Bearer TOKEN
Request Body
currencySymbol*
string
Must be "SOL"
action*
string
Must be "withdraw-stake"
address*
string
Your wallet address
stakeAccountPublicKey*
string
Public key of your stake account. Public key can be extracted from "Create stake account" call
amount*
string
Amount to withdraw
{
network: string;
amount: string;
serializedTransaction: string;
}
Last updated
Was this helpful?