To find the balance of a Solana subaccount: obtain its public key; use SolanaExplorer, SolanaCLI, or development tools to query the balance.
How to find the Solana sub-account balance
Step 1: Obtain the sub-account public key
To find the balance of a subaccount, you need to know its public key. You can obtain the sub-account public key through the following methods:
- Request directly from the sub-account owner
- Generate using a wallet that supports derived accounts (such as Phantom or Slope wallet)
- Using
spl-token
The library is derived from the parent account address
Step 2: Query the account balance
Using the child Account public key, you can check its balance through the following method:
-
Use Solana Explorer:
- Go to Solana Explorer (https: //explorer.solana.com/)
- Enter the subaccount public key in the search bar
- View the "Tokens" tab to find the token balance
-
Using Solana CLI:
- Open a terminal or command prompt
- Enter the following command:
solana --url https://api.devnet.solana.com/ get-token-accounts publicKeyOfSubaccount
Where
"publicKeyOfSubaccount"
is the public key of the sub-account. -
Use development tools:
- Use tools such as
web3.js
oranchor
Development tools like this connect to the Solana network - Get the sub-account account object and use the
getBalance()
method to query the balance
- Use tools such as
Note:
- Subaccount balances are stored in a different account than the parent account.
- You can only query the balance of sub-accounts holding SPL tokens (such as SOL, SRM, RAY).
- A small transaction fee is required to retrieve the sub-account balance.
The above is the detailed content of How to find sub-account balance in solana. For more information, please follow other related articles on the PHP Chinese website!

The value of blockchain-based U.S. Treasuries is closing in on a new milestone, with total holdings approaching $6 billion.

Canary Capital is looking to launch an exchange-traded fund (ETF) tracking the price of Tron's native token, TRX, according to a filing.

The stablecoin market has surpassed a total capitalization of $233 billion. Within this sector, Solana's stablecoins have reached a new all-time high market capitalization of $12.73 billion

Canary Capital is looking to get the U.S. Securities and Exchange Commission's sign-off for an exchange-traded fund that would track the Tron token TRX and has a staking component.

In an April 18 X post, Soto-Wright said he wanted Congress to “keep state-regulated issuers in the game” when it comes to stablecoin regulation, referencing efforts in the House of Representatives and Senate to create a federal regulatory framework.

Saylor's ideas centre on the fixed 21 million coin supply of Bitcoin. He presents this shortage as a revolutionary economic idea rather than only a technical one.

The TRUMP memecoin has gained significant popularity on the Solana network primarily due to its direct affiliation with the U.S. President Donald Trump.

The TRUMP memecoin has gained significant popularity on the Solana network primarily due to its direct affiliation with the U.S. President Donald Trump.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version
God-level code editing software (SublimeText3)