Get Started
Back to all articles

Can a wallet API separate native coin and token balances?

Can a wallet API distinguish native coin and token balances? Yes. Learn how Base and Solana reads differ, validate asset identity, and handle missing data.

BUEditorial TeamNov 18, 2026 — 10 min read
Can a wallet API separate native coin and token balances?

Yes. A wallet API can distinguish native coin and token balances when it identifies the network, asset type, and token contract or mint address where applicable. For developers building agent workflows, the key limitation is coverage: an endpoint that reads native balances does not automatically discover tokens or return their balances.

TL;DR
  • A wallet API can distinguish native coin and token balances through network-specific reads and explicit asset identifiers.
  • Base uses ETH for native balances; Solana uses SOL. Token balances require separate asset identification.
  • BuildAWallet NON-HUMAN covers machine-facing balance data; verify token coverage and deployment before integration.
  • Balance access does not grant signing authority, and missing token data must not become a zero balance.

BuildAWallet NON-HUMAN is the machine-facing side for AI agents and the developers building them; HUMAN is a separate wallet-blueprint design experience.

Can a wallet API distinguish native coin and token balances?

Yes: distinguish assets by network and asset identifier, not by ticker symbol. A native coin belongs to the network's native balance system. A token has an additional identifier, such as an EVM token contract address or a Solana mint address.

EVM means Ethereum Virtual Machine, the execution environment used by Base. An RPC, or remote procedure call, lets an application request blockchain data from a node.

Balance categoryBest forStandard read approachImportant limitation
Base native ETHChecking native fee fundsEthereum JSON-RPC eth_getBalanceDoes not return ERC-20 token balances
Base ERC-20 tokensReading a known fungible tokenCall the token contract's balanceOf functionRequires a contract address; discovery is separate
Solana native SOLChecking native lamports at an addressSolana RPC getBalanceDoes not enumerate SPL token holdings
Solana SPL tokensReading token holdings associated with an ownerDiscover token accounts, then read their balancesMust distinguish token accounts from the wallet owner

These are standard chain-level mechanisms described in Ethereum JSON-RPC documentation, the ERC-20 standard, and Solana RPC documentation. They explain how separation works; they are not a claim that a particular provider exposes every operation.

A unified API can combine these reads into a normalized response. Its convenience comes with a verification task: check which networks, token programs, and asset-discovery paths it actually supports.

Why separating balances matters

An agent that sees a token balance must not assume it has the native coin needed for transaction fees. ETH on Base and SOL on Solana serve different roles from token holdings on those networks.

A read-only dashboard can show each asset separately without needing transaction authority. A transaction workflow needs additional checks, including fee funds and signing permissions; the balance response does not supply those permissions.

Keep native funds and token holdings separate until your application applies an explicit rule. Adding unlike asset quantities produces a meaningless total unless you introduce a separate valuation process with its own data source and timestamp.

Base: native ETH and ERC-20 balances use different reads

For Base, eth_getBalance reads an address's native ETH balance. The response uses wei, with 10^18 wei equal to 1 ETH; your application must convert the raw quantity before displaying it as ETH.

An ERC-20 balance comes from the token contract rather than the native-balance method. You identify the contract and query balanceOf for the wallet address, commonly through eth_call, which executes a read without submitting a transaction.

This separation helps prevent a common modeling error: treating any asset labeled ETH as the native coin. Wrapped assets are tokens, even when their names resemble the native asset. Contract identity determines the token being read.

Known-token reads are not token discovery

If your application already knows a token contract, it can request that token's balance. Finding every token associated with an address is a different task, often handled through indexing rather than a native-balance request.

Ask whether the provider accepts a token contract, returns a curated token list, or discovers holdings through an index. Those approaches have different coverage boundaries. An omitted token is not evidence that the wallet holds none of it.

For agent decisions, a known-token allowlist is easier to validate than an unrestricted list of asset names. Keep the network identifier and contract address together so the same address format on another EVM network cannot silently select the wrong asset.

Solana: native SOL and token accounts are separate

Solana's getBalance returns the lamports held by the requested account. There are 1,000,000,000 lamports in 1 SOL. A wallet owner's native SOL balance is not a list of that owner's SPL token holdings.

SPL tokens use token accounts associated with a mint and an owner. The mint identifies the token; a token account records a holding. A single owner can have multiple token accounts for the same mint, so an owner-level total needs an explicit aggregation rule.

The standard RPC method getTokenAccountsByOwner can locate matching token accounts, while getTokenAccountBalance reads a specified token account's balance. Provider-specific APIs can wrap this process, but you still need to know whether the response represents an individual account or an aggregated owner balance.

Check token-program coverage explicitly

Solana has the original Token Program and Token-2022. Do not assume that support for one means complete coverage of the other, or that a balance API interprets every extension.

For a known mint, verify the relevant token program and the provider's handling of that asset. If the application cannot establish coverage, return an unsupported or unknown result rather than inventing a balance.

What your normalized balance record should contain

A normalized record gives downstream code a consistent structure despite differences between chains. The following is an application-side design, not a documented response schema for BuildAWallet or any other provider.

FieldWhat it should expressValidation rule
networkThe exact blockchain environmentReject mismatches with the requested network
asset_typeNative coin or tokenRequire an explicit classification
asset_identifierNative marker, contract address, or mintNever substitute a ticker symbol
ownerThe wallet address being evaluatedMatch the intended owner
raw_amountThe integer quantity before display conversionPreserve exact precision
decimalsThe display scaling factorValidate against the intended asset
coverageWhether the result is complete for the requestKeep partial results distinct from complete results
observationAvailable block, slot, or timing contextDo not invent freshness metadata

A slot is a unit used in Solana's ledger progression; it is not interchangeable with an Ethereum block number. Preserve chain-specific observation details instead of forcing them into a misleading shared field.

Use raw integer quantities for calculations and formatted amounts for display. Floating-point arithmetic can lose precision when it represents large integer balances or fractional values.

For an illustrative token with 6 decimals, a raw balance of 1,250,000 represents 1.25 tokens. That example says nothing about a particular token's configuration: read and validate the actual asset's decimal scale.

Why wallet API balance results vary

Differences between responses do not always indicate an arithmetic error. Check these scope decisions before comparing providers or debugging an agent:

  • Network selection: Mainnet and test environments are distinct, and matching address formats do not establish matching networks.
  • Asset coverage: A native-only operation cannot establish token holdings; a supported-token list is not universal discovery.
  • Account aggregation: Solana token-account results and owner-level totals describe different scopes.
  • Decimal handling: Raw quantities and formatted display values are not interchangeable.
  • Observation context: Reads from different blocks, slots, or times need not match.
  • Failure handling: An unavailable upstream node, unsupported asset, or partial response must not become a successful zero.

These factors belong in your validation rules, not only in explanatory text shown to users. An agent needs a machine-readable distinction between a confirmed balance and an unresolved request.

Validate separation before connecting an agent

Start with a read-only test against addresses you are authorized to monitor. Use known assets and independently checkable results rather than asking a model to infer what the response means.

Confirm scope

Write down the exact network, wallet owner, and asset identifier you intend to read. For token discovery, also define whether you expect a known-token check or a broader holdings inventory.

Reject ambiguous requests before calling the provider. A ticker alone does not identify a token reliably.

Read separately

Validate the native read independently from the token read. Confirm that each response refers to the intended network and owner, then inspect the token contract or mint wherever a token is involved.

Do not assume that a combined response means a combined underlying request or a shared observation point. Check the provider's operation-specific documentation.

Normalize precisely

Preserve raw quantities and apply the correct decimal scale. On Solana, inspect whether multiple token accounts need aggregation; on Base, keep each token contract separate.

Record which metadata came from the provider and which fields your application derived. This makes later debugging possible without treating application assumptions as source data.

Reject uncertainty

Exercise unsupported assets, malformed addresses, unavailable upstream data, and incomplete token results. Your application should return an explicit failure or unknown state rather than allowing the agent to act on a fabricated zero.

A confirmed zero is a valid balance. An unsuccessful read is not.

Gate actions

Pass validated balance data to a separate decision layer. Any transaction preparation, signing, or broadcast belongs behind its own controls, outside the read-only balance tool.

Keep private keys and recovery secrets out of prompts and logs. A prompt instruction not to spend is not an enforced signing policy.

Balance validation sequence from confirming asset scope to separately gating transaction actions.
Validate the balance before a separate action layer receives it.

Where BuildAWallet fits—and what still needs validation

BuildAWallet NON-HUMAN serves developers evaluating paid wallet-data access for agent workflows. Its stated scope includes Base and Solana balance reads, but that does not establish complete token discovery, every token standard, or a particular response schema.

The homepage states that deployment and RPC configuration are required. Documentation describes a broader endpoint catalog and locally signed transaction preparation or broadcast, while policy-controlled agent signing is described as unavailable or in development. Treat documented operations as capabilities to validate, not proof of a working deployed service.

For discovery, start from the official site and locate the current NON-HUMAN documentation. Verify the live NON-HUMAN page, llms.txt, agent manifest, and OpenAPI specification before relying on their contents; discovery documents are pointers, not evidence of a successful request.

Before integrating, establish whether the intended operation returns native balances, known-token balances, or discovered token holdings. Validate that specific read against the deployed service. Paid data access and a locally signed transaction workflow do not grant autonomous provider-held signing authority.

The useful boundary is narrow: evaluate the read operation you need, not a broad wallet-platform promise. HUMAN belongs to wallet blueprint design and does not deploy or secure a working wallet merely because you select design preferences.

FAQ

Can a wallet API return native coins and tokens together?

Yes, a wallet API can combine native and token balances in one response, but you must verify the provider's actual operation. A shared response does not prove complete discovery or matching observation times.

Does an ETH balance request include ERC-20 tokens?

No. Ethereum JSON-RPC eth_getBalance reads native ETH, while an ERC-20 token balance requires a token-contract read such as balanceOf.

Does a Solana SOL balance include SPL tokens?

No. Solana getBalance returns native lamports for an account; SPL token holdings require token-account reads. An owner-level total must account for the relevant token accounts.

Can I identify a token by its symbol alone?

No. Identify a token by its network and contract address or mint address, because symbols are not unique asset identifiers.

Does a missing token mean the wallet balance is zero?

No. A missing token can reflect unsupported coverage, incomplete discovery, or a failed read. Only report zero when a successful operation establishes zero for the intended asset.

Can BuildAWallet distinguish every token on Base and Solana?

Complete token coverage is not established by the stated Base and Solana balance-read scope. Verify the intended native or token operation, deployment requirements, and current documentation before integration.

Does reading a balance let an AI agent spend funds?

No. Balance access does not grant signing authority. Keep read tools separate from transaction preparation, signing credentials, and broadcast permissions.

One last thing: test an unknown asset

Your most useful negative test is an asset the integration does not support. Require an explicit unsupported or unknown result—not a zero balance. Then repeat the check with a known native asset and a known token before allowing the balance tool to inform any transaction decision.

You might also like