Allnodes Docs
  • Allnodes API
  • Endpoints
    • Validator
    • Staking
    • Full Node
  • 1INCH NETWORK (1INCH)
    • Staking
  • AAVE (AAVE)
    • Staking
  • AVALANCHE (AVAX)
    • Validator
  • Dash (DASH)
    • Masternode
  • ETHEREUM (ETH)
    • Validator
    • Staking
  • Firo (FIRO)
    • Masternode
  • KUSAMA (KSM)
    • Kusama Staking
  • NEAR Protocol (NEAR)
    • NEAR Protocol Staking
  • PAC PROTOCOL (PAC)
    • Masternode
  • POLKADOT (DOT)
    • Polkadot Staking
  • POLYGON (POL)
    • Staking
  • SHIBA INU (SHIB)
    • Shiba Inu Staking
  • SOLANA (SOL)
    • Solana Staking
  • Syscoin (SYS)
    • Masternode
  • THE GRAPH (GRT)
    • The Graph Staking
  • TRON (TRX)
    • Tron Staking
Powered by GitBook
On this page
  • Get stake accounts
  • Create stake account
  • Stake coins
  • Unbond coins
  • Withdraw stake (after unbonding period finished)

Was this helpful?

  1. SOLANA (SOL)

Solana Staking

PreviousShiba Inu StakingNextMasternode

Last updated 2 years ago

Was this helpful?

Instructions:

Get stake accounts

POST https://www.allnodes.com/api/v1/staking

This endpoint allows you to get list of all your stake accounts.

Headers

Name
Type
Description

Authorization*

string

Bearer TOKEN

Request Body

Name
Type
Description

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

Name
Type
Description

Authorization*

string

Bearer TOKEN

Request Body

Name
Type
Description

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;
}
{
  "error": "ACCOUNT_DOES_NOT_EXIST"
}

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

Name
Type
Description

Authorization*

string

Bearer TOKEN

Request Body

Name
Type
Description

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;
}
{
  "error": "INVALID_ADDRESS"
}

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

Name
Type
Description

Authorization*

string

Bearer TOKEN

Request Body

Name
Type
Description

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;
}
{
  "error": "INVALID_ADDRESS"
}

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

Name
Type
Description

Authorization*

string

Bearer TOKEN

Request Body

Name
Type
Description

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;
}
{
  "error": "NOT_SPECIFIED_AMOUNT"
}
https://help.allnodes.com/en/articles/6612209-solana-staking-api