Skip to main content
POST
getBalance
curl --request POST \
  --url https://devnet-as.magicblock.app/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "getBalance",
  "jsonrpc": "2.0",
  "params": [
    "5RgeA5P8bRaynJovch3zQURfJxXL3QK2JYg1YamSvyLb"
  ],
  "id": 0
}
'
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "context": {
      "apiVersion": "2.2.1",
      "slot": 85838062
    },
    "value": {
      "amount": 5000000,
      "decimals": 9
    }
  },
  "error": null
}

Body

application/json
method
enum<string>
default:getBalance
required
Available options:
getBalance
jsonrpc
enum<string>
default:2.0
required
Available options:
2.0
params
(string | object)[]
required

Method-specific parameters. See Solana RPC docs for exact shape.

Required array length: 1 - 2 elements
id
default:0
required

Response

200 - application/json

Successful response

jsonrpc
enum<string>
default:2.0
required
Available options:
2.0
id
required
result

Method-specific result payload.

error
object