getBalance - Solana

getBalance. Retrieves the balance of an account on the Solana blockchain

getBalance - solana [Value: 12CU]
Retrieves the balance of an account on the Solana blockchain.
Use cases

Use cases

  • Verify wallet balance before transactions
  • Monitor account balance for automated financial services
  • Check balance changes to detect unusual account activity
Constraints

Constraints

  • Requires valid Solana public key
  • Network delays can affect response time
  • Rate limits may impact frequent balance checks
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --location --request POST 'https://solana.drpc.org' \
--header 'Content-Type: application/json' \
--data-raw '  {
    "jsonrpc": "2.0",
    "id": 1,
    "method":"getBalance", 
    "params":
    [
    "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
    ]
  }'
Copy
Response
200
{
  "id": 0,
  "jsonrpc": "string",
  "result": {
    "context": {
      "slot": 0
    },
    "value": 0
  }
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
accountPublicKeystring
The public key of the account to query.
configobject
Configuration object containing optional parameters:
array
commitmentstring
Sets the commitment level for the blocks queried. Valid options are: finalized, confirmed, processed
minContextSlotobject
The minimum slot number at which the request can be evaluated.

Response

200
Contains balance information for the specified account

Response params

object
idinteger
jsonrpcstring
resultstring
object
slotint64
valuenumber