Solana(SOL)

Solana is a high-throughput Layer 1 blockchain launched in 2020 by Solana Labs, built around a single global state machine rather than sharding or rollups. It pairs Proof of History, a verifiable delay function that orders transactions before consensus, with Proof of Stake for validator selection, and executes non-conflicting transactions concurrently through the Sealevel runtime. The design targets sub-second confirmation for payments, order-book trading, and consumer applications that cannot tolerate multi-second block times.

Key Features

  • Proof of History: A cryptographic clock orders transactions before consensus is reached
  • 400ms Slot Time: Slots are scheduled roughly every 400 milliseconds, four per leader
  • Parallel Execution: The Sealevel runtime executes transactions concurrently when account access sets do not overlap
  • Local Fee Markets: Prioritization fees are priced per account, so congestion on one program does not raise fees network-wide
  • SPL Token Standard: Fungible and non-fungible tokens are handled by the on-chain Token and Token-2022 programs
  • Token Extensions: Token-2022 adds transfer fees, confidential transfers, and metadata without custom programs
  • Versioned Transactions: Address lookup tables allow transactions to reference more accounts than the legacy format permits
  • Stake-Weighted QoS: Transaction forwarding capacity is allocated in proportion to validator stake

TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC API SPECIFICATION.

GetBlock's RPC API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for Solana JSON-RPC methods is solely maintained and published through the official Solana documentation at solana.com/docs. This resource constitutes the sole authoritative reference implementation of the JSON-RPC 2.0 protocol interface across Solana validator clients.

Network Information

PropertyValue
Network NameSolana Mainnet Beta
Genesis Hash5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d
Native CurrencySOL (1 SOL = 1,000,000,000 lamports)
Slot Time~400 milliseconds
Slots per Epoch432,000
ConsensusProof of History + Tower BFT (Proof of Stake)
RuntimeSealevel (parallel execution)
Address FormatBase58-encoded Ed25519 public keys
Token ProgramsSPL Token and Token-2022

Base URL

bashhttps://shared.eu-central-1.getblock.io
bashhttps://shared.us-east-1.getblock.io
bashhttps://shared.ap-southeast-1.getblock.io/

Supported Networks

NetworkJSON RPCWSSMEV-protected(JSON-RPC)Frankfurt, GermanyNew York, USASingapore, Singapore
Mainnet✅✅✅✅✅✅
Devnet✅✅❌✅❌❌
Alpenglow✅✅❌✅❌❌

Quickstart

In this section, you will learn how to make your first call with either:

  • Axios
  • Python

Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).

  1. Setup project

    Create and initialize a new project:

    bashmkdir solana-api-quickstart
    cd solana-api-quickstart
    npm init --yes
  2. Install Axios

    bashnpm install axios
  3. Create file

    Create a new file named index.js. This is where you will make your first call.

  4. Set ES module type

    Set the ES module "type": "module" in your package.json.

  5. Add code

    Add the following code to index.js:

    index.js

    javascriptimport axios from 'axios';
    
    const data = JSON.stringify({
        "jsonrpc": "2.0",
        "method": "getSlot",
        "params": [],
        "id": "getblock.io"
    });
    
    const config = {
        method: 'post',
        url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
        headers: {
            'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios(config)
        .then(response => console.log(JSON.stringify(response.data)))
        .catch(error => console.log(error));

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  6. Run the script

    bashnode index.js

    Expected output (example):

    json{
        "jsonrpc": "2.0",
        "result": 434717885,
        "id": "getblock.io"
    }
  1. Set up the project folder

    bashmkdir solana-api-quickstart
    cd solana-api-quickstart
  2. Create and activate a virtual environment

    bashpython -m venv venv
    source venv/bin/activate
    
    # On Windows, use venv\Scripts\activate
  3. Install requests

    bashpip install requests
  4. Create the script

    Create a file called main.py with the following code (replace <ACCESS-TOKEN> with your GetBlock access token):

    pythonimport requests
    import json
    
    url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
    
    payload = json.dumps({
        "jsonrpc": "2.0",
        "method": "getSlot",
        "params": [],
        "id": "getblock.io"
    })
    
    headers = {
        'Content-Type': 'application/json'
    }
    
    response = requests.post(url, headers=headers, data=payload)
    print(response.text)
  5. Run the script

    bashpython main.py

Available API Methods

GetBlock provides access to standard Solana JSON-RPC methods for the Solana network.

Account Methods

MethodDescription
getAccountInfoReturns all information associated with an account
getBalanceReturns the lamport balance of an account
getMultipleAccountsReturns account information for a list of Pubkeys
getProgramAccountsReturns all accounts owned by a program
getMinimumBalanceForRentExemptionReturns the minimum balance for rent exemption

Token Methods

MethodDescription
getTokenAccountBalanceReturns the token balance of an SPL Token account
getTokenAccountsByOwnerReturns all SPL Token accounts held by an owner
getTokenAccountsByDelegateReturns all SPL Token accounts by approved delegate
getTokenLargestAccountsReturns the 20 largest accounts for a token mint
getTokenSupplyReturns the total supply of an SPL Token mint

Transaction Methods

MethodDescription
sendTransactionSubmits a signed transaction to the cluster
simulateTransactionSimulates a transaction without broadcasting it
getTransactionReturns transaction details for a confirmed signature
getSignatureStatusesReturns the status of a list of signatures
getSignaturesForAddressReturns signatures referencing an address
getTransactionCountReturns the transaction count since genesis
getFeeForMessageReturns the fee for a compiled transaction message
getLatestBlockhashReturns the latest blockhash and its expiry height
isBlockhashValidReports whether a blockhash is still valid
getRecentPrioritizationFeesReturns recent prioritization fee samples
requestAirdropRequests lamports from the faucet on Devnet and Testnet

Block Methods

MethodDescription
getBlockReturns identity and transaction data for a block
getBlocksReturns confirmed block slots in a range
getBlocksWithLimitReturns a limited list of confirmed block slots
getBlockHeightReturns the current block height
getBlockTimeReturns the estimated production time of a block
getBlockCommitmentReturns stake-weighted commitment for a block
getBlockProductionReturns leader slot and block production counts
getFirstAvailableBlockReturns the lowest non-purged confirmed block
getRecentPerformanceSamplesReturns recent throughput samples
minimumLedgerSlotReturns the lowest slot in the node's ledger

Cluster Methods

MethodDescription
getSlotReturns the current slot
getSlotLeaderReturns the current slot leader
getSlotLeadersReturns slot leaders for a slot range
getLeaderScheduleReturns the leader schedule for an epoch
getEpochInfoReturns information about the current epoch
getEpochScheduleReturns the cluster epoch schedule parameters
getClusterNodesReturns nodes discovered through gossip
getVoteAccountsReturns current and delinquent vote accounts
getHealthReturns the health status of the node
getVersionReturns the node software version
getIdentityReturns the identity Pubkey of the node
getGenesisHashReturns the genesis hash of the cluster
getHighestSnapshotSlotReturns the highest snapshot slots
getMaxRetransmitSlotReturns the highest retransmit-stage slot
getMaxShredInsertSlotReturns the highest shred-insert slot

Economics Methods

MethodDescription
getSupplyReturns total and circulating SOL supply
getInflationRateReturns inflation rates for the current epoch
getInflationGovernorReturns the cluster inflation governor
getInflationRewardReturns inflation rewards for a list of addresses
getStakeMinimumDelegationReturns the minimum stake delegation

Support

For technical support and questions:

See Also