Questions tagged [balance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
19 views

Solana getBalance() fetch failed on AWS Lambda

As the title suggests, I need to make an AWS Lambda function which retrieves an account balance. Tha problem is that it often throws the error: INFO Error: failed to get balance of account ...
Francesco's user avatar
1 vote
2 answers
82 views

Token balances on liquidity pools

How can I get to the price in a liquidity pool? I assumed it would be as simple as getting the balances of both tokens and doing quoteBalance / baseBalance, but that doesn't seem to be the case. Below ...
lsrth's user avatar
  • 21
0 votes
0 answers
26 views

My sol balance can't be sent

I am trying to send sol from wallet to another. I have sol, but it says I don't have any available for swap
Erioluwa Benjamin's user avatar
1 vote
1 answer
124 views

How to make make solana web.js bot fast

const { Keypair } = require("@solana/web3.js"); const { getOrCreateAssociatedTokenAccount, createTransferInstruction } = require("@solana/spl-token"); const { Connection, ...
RAJUReDDY's user avatar
0 votes
1 answer
60 views

Sol Balance oddity after buy transaction

I am trying to understand the SOL balance changes in transactions. Solscan shows on the main overview page that 0.001 SOL was used to buy a token and that is the amount that i passed to the Liquidity....
Peter Folsom's user avatar
2 votes
1 answer
46 views

Why does the active stake plus the rent reserve not equal to the total balance? How to correctly calculate the total balance?

So I am trying to report the difference balances on an staking account. My assumption was: total balance = active stake + rent reserve However, this equation is not true when looking at the numbers in ...
sibabtcs's user avatar
1 vote
1 answer
140 views

Error checking balance: argument 'pubkey': 'str' object cannot be converted to 'Pubkey'

I'm currently trying to use python's solana library to check my wallet's balance but for some reason I'm encountering this error. Importing PublicKey doesn't help out either, that gave me an error of &...
Yako's user avatar
  • 11
0 votes
0 answers
16 views

Token balances not showing

My token balances are longer displayed, next to the token there are just some dots where the token balances use to appear, can you please help rectify this issue. Regards
Michael's user avatar
2 votes
1 answer
138 views

What does it mean Lamport?

What does it mean Lamport?. How many Lamports is one Solana?. Is it important?. What is Lamport balance?. How to calculate it?. How many Lamports should I have in my account to be estimated rent ...
Gus's user avatar
  • 21
0 votes
1 answer
51 views

What's rent?. What's estimated become exempt?

I,d like to know what’s rent?. How to calculate it?. Does it work now?. Does it exist now?. When to become rent exempt?. I use Solflare and I’ve an account with more or less 200 Solana and I do ...
Gus's user avatar
  • 21
0 votes
1 answer
91 views

Need Help Displaying Token and NFT Holdings in Solana Dapp Portfolio

I'm currently working on a Solana Dapp portfolio project where users can connect their wallets and view their token and NFT holdings. I am done making the wallet connection buttons and installing ...
M.amanullah behlim's user avatar
0 votes
2 answers
70 views

Display Updated Wallet Balance After Transaction Confirmed

i'm learning solana development from Buildspace and this is the tutorial source code for the next.js app https://github.com/buildspace/solana-send-sol-frontend.git the component to display the solana ...
bwnnwtt's user avatar
  • 21
3 votes
1 answer
201 views

Is there an API to get the balance per day for an account?

I'm looking a way to get the account tranfers for an specific day. Is this possible?
Pablo Lopez's user avatar
3 votes
1 answer
171 views

Get Balance of Sol account more then one account

Can be any API or method to get the balance of a Sol account (more than one account in one time ) not use loop like getBalance() not that function,
Sikandar Hayat's user avatar
0 votes
1 answer
63 views

How can a system transfer instruction not result in a corresponding balance change?

I found a mainnet transaction with an inner system transfer instruction which does not seem to create a corresponding SOL balance change. The inner system transafer is transfering 0.001 SOL from ...
Alon's user avatar
  • 103
1 vote
1 answer
115 views

Empty pre/postTokenBalances when there is an actual token transfer

The RPC returns empty arrays for pre/postTokenBalances for the transaction below, when there is actually a token transfer. https://explorer.solana.com/tx/...
Aris's user avatar
  • 11
2 votes
1 answer
33 views

What does double dererefence ** do in anchor project?

This is how we write code to add fund to a user in anchor solana project: **user.to_account_info().try_borrow_mut_lamports()?+=amount; Why is the "**" operator used here?
Yilmaz's user avatar
  • 1,071
5 votes
1 answer
218 views

How to use Solana rust client to request SOL balance?

I am trying to use Rust (not Typescript) to query Solana and retrieve the SOL balance of a given account. But I can't seem to be able to do this. What I have thus far. As dependencies I have the ...
Finlay Weber's user avatar
0 votes
1 answer
323 views

Find amount of tokens swapped in a transaction?

I have a transaction signature for which I want to know the amount of tokens swapped. I have seen various discussions on the topic. Most of them suggest to make the JSON RPC call using the ...
Mrigank C's user avatar
1 vote
3 answers
438 views

Multiple Solana private keys, how do I check each one for a balance?

I have 100s of solana private keys for a service I'm building. How do I check each one for a balance without having to import them to the solana-cli each time? Is there a simple command to check a ...
Patoshi パトシ's user avatar
1 vote
0 answers
90 views

How to check if a wallet owns at least one NFT within a collection

Is it possible to call something like wallet.BalanceOf(NFTCollectionId)? I see how you can check to see if a specific account owns a specific NFT, but don’t see a way to check if the account owns at ...
zxed's user avatar
  • 111
1 vote
1 answer
66 views

Getting solana balance after transaction (transfered amount)

Hello all, Pretty new to Solana I have a question how can I get the transaction amount, I was told to use the PostBalances and preBalances, but not really sure how to go about it. any help would be ...
Enyel Sequeira's user avatar
4 votes
2 answers
1k views

Getting SOL balance via api for an address

I'm trying to just get the SOL balance, but I get returned a full list of tokens. https://public-api.solscan.io/account/tokens?account=34qHtfUqxgsnTDewwoXEXuhknymJ1sqoXD7H38aKADEw I'm using solscan ...
Patoshi パトシ's user avatar
2 votes
1 answer
200 views

get tokens balance [closed]

Looking for a way to fetch owner tokens and balance. i have tried the following code: const tokenAccounts = await this.solanaUtilService.connection.getTokenAccountsByOwner( this.wallet.publicKey, ...
Avaulto's user avatar
  • 82
2 votes
2 answers
715 views

How do I track historical sol balance?

I want to implement a feature that given by a wallet address and timestamp, it'll return the historical sol balance at that time. By using rpc method getSignaturesForAddress, getTransaction and ...
Xkimnt's user avatar
  • 21
3 votes
2 answers
236 views

How to get multiple accounts info with jsonParsed encoding using @solana/web3.js?

Currently, I can do this using a cURL request: curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d ' { "jsonrpc": "2.0", "id": ...
Peroxy's user avatar
  • 161
9 votes
1 answer
278 views

unable to fetch balance changes Solana Wallet Adaptor

On minting single or two NFTs phantom wallet shows the balance that will be detected before signing Tx but on multiple mint more than 2, it will show msg "unable to fetch balance changes" ...
Abdullah Qureshi's user avatar
5 votes
1 answer
115 views

Solana rent exempt account, period of exemption

Hey so we are all said to make rent-exempt accounts at creation time but is the rent exemption permanent? If not, how is the top-up handled after the exemption period? Like as soon as it ends you add ...
Nabeel Naveed's user avatar