Author

Topic: How to send bitcoin automatically? (Read 476 times)

full member
Activity: 170
Merit: 108
June 15, 2018, 03:32:29 AM
#14
If bitcoin's balance is higher than some standard (like 0.2 BTC), how to send another address automatically?

I want to make this process automatic.

This question sounds like it has significant potential to be an XY problem.

Why do you want "to send another address automatically?"  I suspect that there might be a better way to accomplish what you want instead of doing that.
Because I want to automatically move coin to more safe place.

Agree that you should receive to the cold storage but if you still want to do simple operations with a wallet. You can use https://github.com/ruimarinho/bitcoin-core to getbalance and if it's over a certain threshold simply sendToAddress. Note that you'll need a full node obviously.
legendary
Activity: 1624
Merit: 2481
June 12, 2018, 05:33:59 AM
#13
I want to automatically move coin to more safe place.

Perhaps you should just receive it at the "more safe place" originally.  Then you won't have to move it.
I think he wants to collect his coins on the live system, and when it goes over a certain threashold, move the funds to the cold storage.

Thats self-explanatory.
DannyHamilton is still right. The 'better' way of doing it would be to receive the payments to the cold storage directly.
Thats way less prone to errors than receiving everything in a hot wallet to forward it afterwards. I don't see the actual benefit.


Every day or week I would receive funds from them. A part was used to buy beer  Smiley At a certain height, I pushed a part manually to my cold storage system.

If you are using two wallets (hot-/cold-), it is recommended (security-wise) to receive them to your cold wallet, which you then use to fund your hot wallet. Not vice-versa.
sr. member
Activity: 257
Merit: 343
June 12, 2018, 03:09:39 AM
#12
I want to automatically move coin to more safe place.

Perhaps you should just receive it at the "more safe place" originally.  Then you won't have to move it.
In another thread OP is asking on cold storage. I think he wants to collect his coins on the live system, and when it goes over a certain threashold, move the funds to the cold storage. Similar as to what the exchanges would do with hot and cold wallets.
I had a similar setup with a mining provider. Every day or week I would receive funds from them. A part was used to buy beer  Smiley At a certain height, I pushed a part manually to my cold storage system.
legendary
Activity: 3472
Merit: 4801
June 10, 2018, 10:42:12 PM
#11
I want to automatically move coin to more safe place.

Perhaps you should just receive it at the "more safe place" originally.  Then you won't have to move it.
jr. member
Activity: 413
Merit: 5
June 10, 2018, 10:31:40 PM
#10
If bitcoin's balance is higher than some standard (like 0.2 BTC), how to send another address automatically?

I want to make this process automatic.

This question sounds like it has significant potential to be an XY problem.

Why do you want "to send another address automatically?"  I suspect that there might be a better way to accomplish what you want instead of doing that.
Because I want to automatically move coin to more safe place.
legendary
Activity: 3472
Merit: 4801
June 08, 2018, 11:16:53 AM
#9
If bitcoin's balance is higher than some standard (like 0.2 BTC), how to send another address automatically?

I want to make this process automatic.

This question sounds like it has significant potential to be an XY problem.

Why do you want "to send another address automatically?"  I suspect that there might be a better way to accomplish what you want instead of doing that.
jr. member
Activity: 30
Merit: 4
June 05, 2018, 04:57:52 PM
#8
If you are coder, make it from JSON RPC.
Yes I am coder, but familiar with C#.

Anyway, how to make from JSON RPC. How? exact process workflow?


There more informations from here:
https://bitcoin.stackexchange.com/questions/5810/how-do-i-call-json-rpc-api-using-c

You can use
Quote
getbalance
method to check if amount to send is available.

And then
Quote
sendfrom
to the amount to another address.

But i think sendfrom is disabled, you have to host a PHP script on your node server that serve as API for your own script.
legendary
Activity: 1624
Merit: 2481
June 05, 2018, 03:19:22 AM
#7
Thanks. So how can I make that script? Is it shell programming? If then, what is the code that run command line execution inside shell script?
I want to see exact code example.

You seem to ask a lot of basic questions.

HCP already gave you pseudo code with your logic, you can work with.

If we would give you an further 'example', it already would be the whole code. Thats literally less than 10 lines of code..


Without offending you.. but if you can't create such a small script (and can't find anything on google), you probaly shouldn't work on a crypto project.

Please do yourself a favor and do NOT create/host a crypto site/project/exchange/.. Your application will definitely be vulnerable.
You are inviting black hats into stealing your funds..
jr. member
Activity: 413
Merit: 5
June 05, 2018, 12:35:04 AM
#6
If you are coder, make it from JSON RPC.
Yes I am coder, but familiar with C#.

Anyway, how to make from JSON RPC. How? exact process workflow?
jr. member
Activity: 30
Merit: 4
June 04, 2018, 08:28:07 PM
#5
If you are coder, make it from JSON RPC.
jr. member
Activity: 413
Merit: 5
June 04, 2018, 06:59:22 PM
#4
A simple script and "cron" should be able to do this... The script can simply use bitcoin-cli and RPC calls to check the balance of the address... then, if addressBalance > $target, create a transaction that sends BTC to the address you want to send to.

Once you have the script working OK, you can use Cron to schedule the task to run every 5-10 minutes (or hourly or daily or whatever you like).

Thanks. So how can I make that script? Is it shell programming? If then, what is the code that run command line execution inside shell script?
I want to see exact code example.
sr. member
Activity: 826
Merit: 263
June 04, 2018, 08:58:59 AM
#3
If bitcoin's balance is higher than some standard (like 0.2 BTC), how to send another address automatically?

I want to make this process automatic.

I am using ubuntu and at there bitcoin daemon is running.

As HCP said you could use the script to push the transaction on the concern wallet you want bro. You could find some exchanges and mining pool wallet do this work. You could take that as a example for it mate.
If you do not want to do work on script side. You will be able to use the exchange the wallet and add the limited fund push after the it reaches the withdrawal limit mate.
HCP
legendary
Activity: 2086
Merit: 4361
June 04, 2018, 02:18:53 AM
#2
A simple script and "cron" should be able to do this... The script can simply use bitcoin-cli and RPC calls to check the balance of the address... then, if addressBalance > $target, create a transaction that sends BTC to the address you want to send to.

Once you have the script working OK, you can use Cron to schedule the task to run every 5-10 minutes (or hourly or daily or whatever you like).
jr. member
Activity: 413
Merit: 5
June 04, 2018, 01:48:03 AM
#1
If bitcoin's balance is higher than some standard (like 0.2 BTC), how to send another address automatically?

I want to make this process automatic.

I am using ubuntu and at there bitcoin daemon is running.
Jump to: