<blockquote>
  <p>When using sendtoaddress api call, do I have to specify a change address?</p>
</blockquote>

<p>No, it generates a new key pair and sends the balance to it. This key pair is stored in your wallet.dat file.</p>

CC BY-SA 3.0
2017-06-01T10:46:57.050Z
2017-06-01T10:46:57.050Z
Bobo
<blockquote>
  <p>Is there a service to monitor the bitcoin balance, or do I just have
  to make a cron job to query it every second?</p>
</blockquote>

<p>I do not know such service. Anyway, you should not give your private keys for any service.</p>

<blockquote>
  <p>When using sendtoaddress api call, do I have to specify a change
  address?</p>
</blockquote>

<p>Why do you want to use bitcoin client and api calls for it? </p>

<blockquote>
  <p>How do other people usually solve this problem?</p>
</blockquote>

<p>This is not a "problem". This is a "task". You should monitor transactions in the network and push your transactions which sweep the outputs to your address. I can provide you such toolkit, but not for free</p>

CC BY-SA 3.0
2017-04-02T09:59:11.050Z
2017-04-02T09:59:11.050Z
amaclin
<p>I'm trying to build a service where I import a bunch of pirvate keys into bitcoin core or some other software if you recommend a better solution. Once the private keys are imported, I want to <em>monitor</em> these addresses and if anything is positive have it send it to another wallet address I own.</p>
<p>I thought aboout importing the private keys with <em>importprivkey</em> api call. Does it take multiple private keys or do I have to loop through them?</p>
<p>Once these private keys are imported into my wallet I want to be able to detect the occurrence of any of the following:</p>
<ul>
<li>if the entire wallet balance is greater than .001</li>
<li>or if 1 hour passes</li>
</ul>
<p>Then, send all coins in the wallet to another address. My questions are:</p>
<ul>
<li>Is there a service to monitor the bitcoin balance, or do I just have to make a cron job to query it every second?</li>
<li>When using <em>sendtoaddress</em> api call, do I have to specify a change address?</li>
<li>How do other people usually solve this problem?</li>
</ul>

CC BY-SA 3.0
2017-04-02T17:27:58.493Z
That seems completely pointless. Why not give the target address in the first place then? Aren't you just generating a fee burden for yourself?
Murch
<json-rpc><sendtoaddress><sweep>
Importing a bunch of btc private keys into bitcoin core, then monitoring and sweeping them all to another address?
Patoshi パトシ
# Importing a bunch of btc private keys into bitcoin core, then monitoring and sweeping them all to another address?

(Asked by: username_0 on 2017-03-29)

I'm trying to build a service where I import a bunch of pirvate keys into bitcoin core or some other software if you recommend a better solution. Once the private keys are imported, I want to *monitor* these addresses and if anything is positive have it send it to another wallet address I own.

I thought aboout importing the private keys with *importprivkey* api call. Does it take multiple private keys or do I have to loop through them?

Once these private keys are imported into my wallet I want to be able to detect the occurrence of any of the following:

* if the entire wallet balance is greater than .001
* or if 1 hour passes

Then, send all coins in the wallet to another address. My questions are:

* Is there a service to monitor the bitcoin balance, or do I just have to make a cron job to query it every second?
* When using *sendtoaddress* api call, do I have to specify a change address?
* How do other people usually solve this problem?

**Tags:** json-rpc, sendtoaddress, sweep

> **Comments:**
> **username_1**: That seems completely pointless. Why not give the target address in the first place then? Aren't you just generating a fee burden for yourself?  

---

## 2 answers

### Answer by username_2 on 2017-06-01. Score: 1 | Accepted answer

> When using sendtoaddress api call, do I have to specify a change address?

No, it generates a new key pair and sends the balance to it. This key pair is stored in your wallet.dat file.


---

### Answer by username_3 on 2017-04-02. Score: 0

> Is there a service to monitor the bitcoin balance, or do I just have
> to make a cron job to query it every second?

I do not know such service. Anyway, you should not give your private keys for any service.

> When using sendtoaddress api call, do I have to specify a change
> address?

Why do you want to use bitcoin client and api calls for it?

> How do other people usually solve this problem?

This is not a "problem". This is a "task". You should monitor transactions in the network and push your transactions which sweep the outputs to your address. I can provide you such toolkit, but not for free


---

