<p>The Wallet Service requires the <code>from</code> option to be specified when sending from an account. It's only optional when your BTC is located in your normal, imported addresses.</p>

<p>Assuming you received funds to your first wallet account, you would set <code>from: 0</code> and the send should succeed.</p>

CC BY-SA 3.0
2017-05-21T20:37:59.590Z
2017-05-21T20:37:59.590Z
Justin Tormey
<p>The first call tells you that it finds "available:0". Since that should try to use all of your received funds, this is likely also the reason why the second call fails.</p>

<p>Are you sure that you've established a session with the same wallet that you received funds to "days ago"? Perhaps you're not correctly authenticated or it was another wallet? Are you sure that the coins are still in the same wallet?</p>

CC BY-SA 3.0
2017-05-20T17:31:01.490Z
`wallet.getBalance()` shows my balance the send call happens right after, I only have 1 wallet which is the default one. If I haven't correctly authenticated I would assume that `wallet.getBalance()` would fail right?
Kit Sunde
CC BY-SA 3.0
2017-05-20T17:32:17.443Z
@KitSunde: Could you perhaps add the response of "getBalance" to your question? Is your incoming transaction confirmed or are you tracking an unconfirmed balance?
Murch
CC BY-SA 3.0
2017-05-20T17:39:12.320Z
I've added it, but it doesn't really say anything beside that I have value in my wallet. My incoming transaction was on May 18th, it has > 400 confirmations, the transaction shows up as confirmed on blockchain.info and in my wallet.
Kit Sunde
CC BY-SA 3.0
2017-05-20T17:42:26.920Z
@KitSunde: Okay, sorry, then I'm out of ideas and I'm not familiar enough with the API of blockchain.info to give further suggestions. I'll leave this answer, because it provides additional information for would-be future answerers. (Or perhaps you can incorporate the relevant bits to your question, and then I can delete it.)
Murch
CC BY-SA 3.0
2017-05-20T17:18:57.990Z
2017-05-20T17:18:57.990Z
Murch
<p>According to <a href="https://github.com/blockchain/api-v1-client-node/tree/master/MyWallet#send-bitcoin" rel="nofollow noreferrer">https://github.com/blockchain/api-v1-client-node/tree/master/MyWallet#send-bitcoin</a> <code>wallet.send</code> doesn't require a <code>from</code> field. When I run <code>wallet.getBalance()</code> it states that I have BTC in my wallet (received days ago). However if I do:</p>

<pre><code>const balanceResponse = await wallet.getBalance();
console.log(balanceResponse);
// { balance: 100000000 }
wallet.send("&lt;receiving address&gt;", 510000, {
  fee: 10000
})
</code></pre>

<blockquote>
  <p>{"error":"Insufficient funds","available":0,"needed":0.0051,"sweep_amount_satoshi":0,"sweep_fee_satoshi":0}</p>
</blockquote>

<p>I've only ever received BTC once in my wallet. If I use that address in the <code>from</code> field:</p>

<pre><code>wallet.send("&lt;receiving address&gt;", 510000, {
  from: "&lt;sending address&gt;",
  fee: 10000
})
</code></pre>

<p>I now get</p>

<blockquote>
  <p>{"error":"Error signing and pushing transaction"}</p>
</blockquote>

<p>What am I doing wrong?</p>

<blockchain.info>
Sending using blockchain.info
Kit Sunde
# Sending using blockchain.info

(Asked by: username_0 on 2017-05-20)

According to <https://github.com/blockchain/api-v1-client-node/tree/master/MyWallet#send-bitcoin> `wallet.send` doesn't require a `from` field. When I run `wallet.getBalance()` it states that I have BTC in my wallet (received days ago). However if I do:

```
const balanceResponse = await wallet.getBalance();
console.log(balanceResponse);
// { balance: 100000000 }
wallet.send("<receiving address>", 510000, {
  fee: 10000
})

```

> {"error":"Insufficient funds","available":0,"needed":0.0051,"sweep\_amount\_satoshi":0,"sweep\_fee\_satoshi":0}

I've only ever received BTC once in my wallet. If I use that address in the `from` field:

```
wallet.send("<receiving address>", 510000, {
  from: "<sending address>",
  fee: 10000
})

```

I now get

> {"error":"Error signing and pushing transaction"}

What am I doing wrong?

**Tags:** blockchain.info


---

## 2 answers

### Answer by username_1 on 2017-05-21. Score: 2 | Accepted answer

The Wallet Service requires the `from` option to be specified when sending from an account. It's only optional when your BTC is located in your normal, imported addresses.

Assuming you received funds to your first wallet account, you would set `from: 0` and the send should succeed.


---

### Answer by username_2 on 2017-05-20. Score: 0

The first call tells you that it finds "available:0". Since that should try to use all of your received funds, this is likely also the reason why the second call fails.

Are you sure that you've established a session with the same wallet that you received funds to "days ago"? Perhaps you're not correctly authenticated or it was another wallet? Are you sure that the coins are still in the same wallet?

> **Comments:**
> **username_0**: `wallet.getBalance()` shows my balance the send call happens right after, I only have 1 wallet which is the default one. If I haven't correctly authenticated I would assume that `wallet.getBalance()` would fail right?  
> **username_2**: @username_0: Could you perhaps add the response of "getBalance" to your question? Is your incoming transaction confirmed or are you tracking an unconfirmed balance?  
> **username_0**: I've added it, but it doesn't really say anything beside that I have value in my wallet. My incoming transaction was on May 18th, it has > 400 confirmations, the transaction shows up as confirmed on blockchain.info and in my wallet.  
> **username_2**: @username_0: Okay, sorry, then I'm out of ideas and I'm not familiar enough with the API of blockchain.info to give further suggestions. I'll leave this answer, because it provides additional information for would-be future answerers. (Or perhaps you can incorporate the relevant bits to your question, and then I can delete it.)  

---

