Skip to main content
The most basic on-chain read: how much SOL does this wallet hold? This endpoint returns the balance in both lamports (integer) and SOL (float), pulled from the finalized state of the requested cluster. It’s free, no API key required, so it’s safe to call from agent bootstrap flows and health checks.

Why agents use this

  • Pre-flight for every transaction. Before your bot builds a swap, confirm the wallet has enough SOL for rent and fees.
  • Free, so use it liberally. No credit debit. Perfect for polling loops and dashboard widgets.
  • Two units of measure. balance_lamports for math, balance_sol for display. No conversion errors.
  • Works on devnet. Testing your bot against devnet? Same endpoint, same shape, just change network.

Use cases

  • Agent “can I afford this?” guard. Before submitting any paid gateway call or on-chain tx, check the wallet has minimum SOL. Skip if not.
  • Wallet dashboard live widget. Poll every 5 seconds for a Vue/React balance display.
  • Health check / uptime ping. Free endpoint = free ping. Alerts on non-200 from your monitoring stack.
  • Multi-wallet portfolio. Fan out balance checks across a family of wallets (treasury, hot, cold) in parallel.
  • Referral leaderboard. Show current SOL balance next to each referred wallet in your incentives dashboard.

Recipe: minimum-balance guard for a trading bot

balance-guard.ts
This is a free endpoint. Great for onboarding: users can hit it before claiming their API key to verify the gateway is live.