<p>Setup bitcoin core (0.18) in my local node.In new version maximum methods are deprecated.I create new address using json rpc method and send some coin s on it.Now I am unable to check the balance of particular address.In this link its shows I received some amount. <a href="https://www.blockchain.com/btc/address/37pwsrhT3gkWpDgTxskWf4m4eUiZ9CXJzJ" rel="nofollow noreferrer">https://www.blockchain.com/btc/address/37pwsrhT3gkWpDgTxskWf4m4eUiZ9CXJzJ</a></p>

<p>I am getting issue in many method.I try to use sendtoaddress method using jsonrpc but how they will recognize from which account I will transfer amount.</p>

<p>I also try to dumpprivate key of some address but this method returns me blank array.</p>

<p>Please help me out from all of this issues.</p>

<p>Thanks in Advance!</p>

CC BY-SA 4.0
2019-09-05T12:42:02.453Z
your node bitcoin core is synchronized with the network?
vincenzopalazzo
CC BY-SA 4.0
2019-09-05T16:35:01.813Z
Bitcoin Core has never supported computing the balance of an individual address.
Pieter Wuille
CC BY-SA 4.0
2019-09-06T03:29:18.913Z
@vincenzopalazzo  synchronization is in process  95% completed.
Nandni
CC BY-SA 4.0
2019-09-06T03:31:06.147Z
@PieterWuille If Bitcoin core is not suppoted invidiual address balance how can I  check that aacount have btc and how I will do transaction from that account .can you please help me.
Nandni
CC BY-SA 4.0
2019-09-06T07:31:23.117Z
@PieterWuille Is sendtoaddress automatically pickup the address from which amount address I want to send amount.There is anny other method which differ the from and to address.
Nandni
CC BY-SA 4.0
2019-09-06T15:53:52.593Z
@Nandhi That's not how Bitcoin works; internally there are no addresses or accounts.
Pieter Wuille
CC BY-SA 4.0
2019-09-06T20:17:16.573Z
Sorry, the intrusion @PieterWuille, I have a question on this problem, the bitcoin core not have the easy possibility to check the balance of the particular address but is possible do it, right? an example with the rpc command listtransactions? or I don't understand this problem? its just my curiosity
vincenzopalazzo
CC BY-SA 4.0
2019-09-06T20:21:16.797Z
1) Addresses don't have a balance (at the protocol level). It's possible to define address balance as the sum of the value of all UTXOs for a given address, but this isn't actually useful for anything but debugging, because (a) you shouldn't reuse addresses and (b) just having an address and its balance is not enough to spend coins (you need to know the actual UTXOs in order to spend them). (2) No, Bitcoin Core has no way of computing this for arbitrary addresses, at all.
Pieter Wuille
CC BY-SA 4.0
2019-09-06T20:26:19.253Z
It is possible to import a particular address as watch-only using importaddress/importmulti, and then rescan the chain for existing transactions affecting that address. Then you can use listunspent and sum up all UTXOs for that address. That works, but it's incredibly slow (may take hours, and needs the full chain locally). It's also pointless; a wallet is not just a single address, and generally you care about all UTXOs combined, not just those currently assigned to a single address
Pieter Wuille
CC BY-SA 4.0
2019-09-06T20:37:46.570Z
So @PieterWuille, is possible to get the amount on the specific address if I parsing the RPC response. It is not useful and bitcoin core works against this idea, but if I want to put my address for github donations, I can see the amount my donation balance is total sum value "listuspend" for addresses, right?
vincenzopalazzo
CC BY-SA 4.0
2019-09-06T20:46:19.283Z
Also if I have the my address on the green wallet, is possible to import the specific address inside the bitcoin core but he is forced to scan all the blocks and reconstruct the history of the address, right?
vincenzopalazzo
CC BY-SA 4.0
2019-09-06T21:04:29.430Z
You can use `listreceivedbyaddress` instead to see how much you've received on an address. How much is left on that address should be irrelevant to you. As soon as you make a transaction with the Green wallet, some of the funds will move elsewhere, and that's ok.
Pieter Wuille
CC BY-SA 4.0
2019-09-06T21:06:12.037Z
My point is that almost always, even in this case, you care about either how much you've received, or about how much is left _in your entire wallet_. Trying to deduct this information from individual address balances is an unnecessary complication that will just leave you confused.
Pieter Wuille
CC BY-SA 4.0
2019-09-06T21:19:57.240Z
Yes is unnecessary complication, thank so much :)
vincenzopalazzo
CC BY-SA 4.0
2019-09-09T06:50:34.580Z
@Pieter Wuille Actually I am creating jsonrpc method API's for my exchange.If one user want to buy btc and other want to sell btc then which rpc  method  I will use to do transaction.How I will deduct btc from one user address and send to another user address?Which method work for this process.
Nandni
CC BY-SA 4.0
2019-09-09T15:53:49.853Z
@Nandni Use a proper database outside of Bitcoin Core to keep track of how much every user has.
Pieter Wuille
CC BY-SA 4.0
2019-09-10T03:40:15.480Z
@PieterWuille thanks for your support. Yes I am tracking record of each user how much every user have BTC .I have query. If one user wants to buy some btc from other user then which RPC method  I will call to send amount like when I am using "sendtoaddress" method then I will  mention  where from which account to send amount .Is there any method which is clear to me that from this account I am sending amount to this user.
Nandni
<bitcoin-core>
Any method to check balance of particular address in bitcoin core (0.18) using json rpc?
Nandni
# Any method to check balance of particular address in bitcoin core (0.18) using json rpc?

(Asked by: username_0 on 2019-09-05)

Setup bitcoin core (0.18) in my local node.In new version maximum methods are deprecated.I create new address using json rpc method and send some coin s on it.Now I am unable to check the balance of particular address.In this link its shows I received some amount. <https://www.blockchain.com/btc/address/37pwsrhT3gkWpDgTxskWf4m4eUiZ9CXJzJ>

I am getting issue in many method.I try to use sendtoaddress method using jsonrpc but how they will recognize from which account I will transfer amount.

I also try to dumpprivate key of some address but this method returns me blank array.

Please help me out from all of this issues.

Thanks in Advance!

**Tags:** bitcoin-core

> **Comments:**
> **username_1**: your node bitcoin core is synchronized with the network?  
> **username_2**: Bitcoin Core has never supported computing the balance of an individual address.  
> **username_0**: @username_1  synchronization is in process  95% completed.  
> **username_0**: @username_2 If Bitcoin core is not suppoted invidiual address balance how can I  check that aacount have btc and how I will do transaction from that account .can you please help me.  
> **username_0**: @username_2 Is sendtoaddress automatically pickup the address from which amount address I want to send amount.There is anny other method which differ the from and to address.  
> **username_2**: @Nandhi That's not how Bitcoin works; internally there are no addresses or accounts.  
> **username_1**: Sorry, the intrusion @username_2, I have a question on this problem, the bitcoin core not have the easy possibility to check the balance of the particular address but is possible do it, right? an example with the rpc command listtransactions? or I don't understand this problem? its just my curiosity  
> **username_2**: 1) Addresses don't have a balance (at the protocol level). It's possible to define address balance as the sum of the value of all UTXOs for a given address, but this isn't actually useful for anything but debugging, because (a) you shouldn't reuse addresses and (b) just having an address and its balance is not enough to spend coins (you need to know the actual UTXOs in order to spend them). (2) No, Bitcoin Core has no way of computing this for arbitrary addresses, at all.  
> **username_2**: It is possible to import a particular address as watch-only using importaddress/importmulti, and then rescan the chain for existing transactions affecting that address. Then you can use listunspent and sum up all UTXOs for that address. That works, but it's incredibly slow (may take hours, and needs the full chain locally). It's also pointless; a wallet is not just a single address, and generally you care about all UTXOs combined, not just those currently assigned to a single address  
> **username_1**: So @username_2, is possible to get the amount on the specific address if I parsing the RPC response. It is not useful and bitcoin core works against this idea, but if I want to put my address for github donations, I can see the amount my donation balance is total sum value "listuspend" for addresses, right?  
> **username_1**: Also if I have the my address on the green wallet, is possible to import the specific address inside the bitcoin core but he is forced to scan all the blocks and reconstruct the history of the address, right?  
> **username_2**: You can use `listreceivedbyaddress` instead to see how much you've received on an address. How much is left on that address should be irrelevant to you. As soon as you make a transaction with the Green wallet, some of the funds will move elsewhere, and that's ok.  
> **username_2**: My point is that almost always, even in this case, you care about either how much you've received, or about how much is left _in your entire wallet_. Trying to deduct this information from individual address balances is an unnecessary complication that will just leave you confused.  
> **username_1**: Yes is unnecessary complication, thank so much :)  
> **username_0**: @username_2 Actually I am creating jsonrpc method API's for my exchange.If one user want to buy btc and other want to sell btc then which rpc  method  I will use to do transaction.How I will deduct btc from one user address and send to another user address?Which method work for this process.  
> **username_2**: @username_0 Use a proper database outside of Bitcoin Core to keep track of how much every user has.  
> **username_0**: @username_2 thanks for your support. Yes I am tracking record of each user how much every user have BTC .I have query. If one user wants to buy some btc from other user then which RPC method  I will call to send amount like when I am using "sendtoaddress" method then I will  mention  where from which account to send amount .Is there any method which is clear to me that from this account I am sending amount to this user.  

---

## 0 answers

