<p>Your question:</p>

<blockquote>
  <p>How to get the available balance of a specific address using blockchain.info</p>
</blockquote>

<p>The description for the <code>/balance</code> API:</p>

<blockquote>
  <p>List the balance summary of each address listed.</p>
</blockquote>

<p>So use <code>/balance</code>.</p>

<p><code>/unspent</code> lists all the outputs for all addresses you provide in one big list, not grouped by address. But since you're just adding them all anyway, it doesn't make much difference for you. The <code>/balance</code> result is shorter and simpler.</p>

<blockquote>
  <p>basically want to know the total amount available to spend on each address(actually on the whole wallet but there is no such api call</p>
</blockquote>

<p>Have you checked the <a href="https://blockchain.info/api/blockchain_wallet_api" rel="nofollow noreferrer">Wallet API</a>? "Fetching the wallet balance" looks like what you need.</p>

CC BY-SA 3.0
2017-12-18T00:20:32.793Z
Ok, I will use the /balance call. The wallet API is  confusing and basically useless because it says it may include double spends and unconfirmed transactions...why would I need that? I just want to send the total amount from one address to another one...I don't want to generate invalid transactions.
Books
CC BY-SA 3.0
2017-12-18T00:12:03.407Z
2017-12-18T00:17:31.230Z
2017-12-18T00:17:31.230Z
Adam Millerchip
<p>There seem to be two calls. What's the difference between them ? I basically want to know the total amount available to spend on each address(actually on the whole wallet but there is no such api call so I have to calculate the amount from all the addresses). </p>

<blockquote>
  <p><strong>Unspent outputs</strong></p>

<pre><code>https://blockchain.info/unspent?active=$address
</code></pre>
  
  <p>Multiple Addresses Allowed separated by "|"   Address can be base58
  or xpub</p>
  
  <p>Optional limit parameter to show n transactions e.g. &amp;limit=50
  (Default: 250, Max: 1000)
      Optional confirmations parameter to limit the minimum confirmations e.g. &amp;confirmations=6</p>
  
  <p>The tx hash is in reverse byte order. What this means is that in order
  to get the html transaction hash from the JSON tx hash for the
  following transaction, you need to decode the hex (using this site for
  example). This will produce a binary output, which you need to reverse
  (the last 8bits/1byte move to the front, second to last 8bits/1byte
  needs to be moved to second, etc.). Then once the reversed bytes are
  decoded, you will get the html transaction hash.</p>

<pre><code>{
    "unspent_outputs":[
        {
            "tx_age":"1322659106",
            "tx_hash":"e6452a2cb71aa864aaa959e647e7a4726a22e640560f199f79b56b5502114c37",
            "tx_index":"12790219",
            "tx_output_n":"0",
            "script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac", (Hex encoded)
            "value":"5000661330"
        }
    ]
}
</code></pre>
  
  <p><strong>Balance</strong></p>
  
  <p><a href="https://blockchain.info/balance?active=" rel="nofollow noreferrer">https://blockchain.info/balance?active=</a>$address</p>

<pre><code>Multiple Addresses Allowed separated by "|"
Address can be base58 or xpub
</code></pre>
  
  <p>List the balance summary of each address listed.</p>

<pre><code>{
    "1MDUoxL1bGvMxhuoDYx6i11ePytECAk9QK": {
        "final_balance": 0,
        "n_tx": 0,
        "total_received": 0
    },
    "15EW3AMRm2yP6LEF5YKKLYwvphy3DmMqN6": {
        "final_balance": 0,
        "n_tx": 2,
        "total_received": 310630609
    }
}
</code></pre>
</blockquote>

<blockchain.info><listunspent>
How to get the available balance of a specific address using blockchain.info?
Books
# How to get the available balance of a specific address using blockchain.info?

(Asked by: username_0 on 2017-12-17)

There seem to be two calls. What's the difference between them ? I basically want to know the total amount available to spend on each address(actually on the whole wallet but there is no such api call so I have to calculate the amount from all the addresses). 

Unspent outputs
https://blockchain.info/unspent?active=$address

Multiple Addresses Allowed separated by "|"   Address can be base58
  or xpub
Optional limit parameter to show n transactions e.g. &limit=50
  (Default: 250, Max: 1000)
      Optional confirmations parameter to limit the minimum confirmations e.g. &confirmations=6
The tx hash is in reverse byte order. What this means is that in order
  to get the html transaction hash from the JSON tx hash for the
  following transaction, you need to decode the hex (using this site for
  example). This will produce a binary output, which you need to reverse
  (the last 8bits/1byte move to the front, second to last 8bits/1byte
  needs to be moved to second, etc.). Then once the reversed bytes are
  decoded, you will get the html transaction hash.
{
    "unspent_outputs":[
        {
            "tx_age":"1322659106",
            "tx_hash":"e6452a2cb71aa864aaa959e647e7a4726a22e640560f199f79b56b5502114c37",
            "tx_index":"12790219",
            "tx_output_n":"0",
            "script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac", (Hex encoded)
            "value":"5000661330"
        }
    ]
}

Balance
https://blockchain.info/balance?active=$address
Multiple Addresses Allowed separated by "|"
Address can be base58 or xpub

List the balance summary of each address listed.
{
    "1MDUoxL1bGvMxhuoDYx6i11ePytECAk9QK": {
        "final_balance": 0,
        "n_tx": 0,
        "total_received": 0
    },
    "15EW3AMRm2yP6LEF5YKKLYwvphy3DmMqN6": {
        "final_balance": 0,
        "n_tx": 2,
        "total_received": 310630609
    }
}

**Tags:** blockchain.info, listunspent


---

## 1 answers

### Answer by username_1 on 2017-12-18. Score: 1 | Accepted answer

Your question:

> How to get the available balance of a specific address using blockchain.info

The description for the `/balance` API:

> List the balance summary of each address listed.

So use `/balance`.

`/unspent` lists all the outputs for all addresses you provide in one big list, not grouped by address. But since you're just adding them all anyway, it doesn't make much difference for you. The `/balance` result is shorter and simpler.

> basically want to know the total amount available to spend on each address(actually on the whole wallet but there is no such api call

Have you checked the [Wallet API](https://blockchain.info/api/blockchain_wallet_api)? "Fetching the wallet balance" looks like what you need.

> **Comments:**
> **username_0**: Ok, I will use the /balance call. The wallet API is  confusing and basically useless because it says it may include double spends and unconfirmed transactions...why would I need that? I just want to send the total amount from one address to another one...I don't want to generate invalid transactions.  

---

