TriportRPC

Get wallet SOL balance

GEThttps://api.triport.io/v1/sol/wallet/balance/So11111111111111111111111111111111111111112

Returns the current native SOL balance of a Solana account, in lamports and as a UI-amount.

Solanasol_read_rpcfree — 20 rps sustained (burst ×2)

Fetches the latest native SOL balance for a single base58 account address. The response gives you the raw lamports value (int64), the same amount converted to whole sol (1 SOL = 1,000,000,000 lamports), and the slot at which the balance was observed.

This is a latency-critical, read-only endpoint and is the cheapest way to poll an account's spendable SOL. It is available on the free tier; it is only throttled when a free-tier key exceeds its quota (see Errors).

Note that this returns native SOL only. To list SPL-token balances on the same address use GET /v1/sol/wallet/tokens/{address}; for the full account record (owner program, executable flag, raw data) use the snapshot endpoint.

Parameters

Path parameters

addressstringrequired
Solana base58 pubkey, 32–44 characters, matching ^[1-9A-HJ-NP-Za-km-z]+$.

Response

Response fields

FieldTypeDescription
addressstringThe queried base58 account address (echoed back).
lamportsinteger (int64, ≥ 0)Native SOL balance in lamports.
solnumber (double, ≥ 0)The same balance expressed in whole SOL (lamports / 1e9).
slotinteger (int64, ≥ 0)Slot at which the balance was read.

address, lamports, and sol are always present; slot may be omitted when the upstream context slot is unavailable.

Errors

All errors share the standard JSON envelope (error, message, optional request_id) — see errors.md for the full schema.

CodeMeaningWhen it happens
401unauthorized / trial_expired / subscription_expiredMissing or invalid key, or the trial/subscription has lapsed.
403tier_insufficient / method_unknownKey lacks the sol_read_rpc scope, or the method is not part of the key's product.
429rate_limitedFree-tier sustained RPS exceeded. The response carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-RateLimit-Category headers, plus retry_after_sec / limit_rps in the body.

There is no daily quota: rate limiting is RPS-per-tier with a burst multiplier, not a daily cap.

Examples

JavaScript (fetch)

const address = "So11111111111111111111111111111111111111112";


const res = await fetch(
  `https://api.triport.io/v1/sol/wallet/balance/${address}`,
  { headers: { Authorization: `Bearer ${process.env.TRIPORT_API_KEY}` } }
);


if (!res.ok) {
  const err = await res.json();
  throw new Error(`${res.status} ${err.error}: ${err.message}`);
}


const { lamports, sol, slot } = await res.json();
console.log(`${sol} SOL (${lamports} lamports) at slot ${slot}`);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const balance = await client.sol.wallet.balance(
  "So11111111111111111111111111111111111111112"
);


console.log(balance.sol, balance.lamports, balance.slot);

Python (triport-sdk)

import os
from triport import Triport


client = Triport(api_key=os.environ["TRIPORT_API_KEY"])


balance = client.sol.wallet.balance(
    "So11111111111111111111111111111111111111112"
)


print(balance.sol, balance.lamports, balance.slot)

Notes

  • Conversion: sol == lamports / 1_000_000_000. For exact accounting prefer the integer lamports field — sol is a float and may lose precision for very large balances.
  • Address validation: a malformed base58 address (wrong length or invalid characters) is rejected before reaching the upstream.
  • Related endpoints: /v1/sol/wallet/tokens/{address} for SPL tokens, /v1/sol/wallet/history/{address} for transaction history, and /v1/sol/wallet/nfts/{address} for NFTs (basic tier).