Author

Topic: Automatic payment script for client. (Read 1291 times)

full member
Activity: 222
Merit: 100
BTCRaven.com Escrow & Advertising
September 23, 2014, 03:56:16 PM
#7
Hi, looking for some advice on setting up automatic payments to multiple addresses once per day.

Each address would count as a percentage and the total funds in wallet at end of day would be sent.

Any ideas?

Would you be interested in having someone build this for you?
I would add this function to my existing escrow service.
newbie
Activity: 30
Merit: 0
September 22, 2014, 11:51:07 PM
#6
Hi,

You can able to do this through cronjob function and a php code, it is easy way to do. Just see bitcoin for developers section.
newbie
Activity: 35
Merit: 0
September 22, 2014, 08:08:36 PM
#5
I think something like this should work.

I cant test it though as I have no bitcoind setup with funds.

But it should work like

Quote
python SendBTC.py ...

SendBTC.py - Python 2.7, You will need to install https://github.com/jgarzik/python-bitcoinrpc
Code:
from bitcoinrpc.authproxy import AuthServiceProxy
import argparse

parser = argparse.ArgumentParser(description='Send Multiple BTC Payments.')
parser.add_argument('BTCAddresses', metavar='N', nargs='+',
                   help='BTC Addresses')

args = parser.parse_args()
print " "

bitcoin = AuthServiceProxy("http://username:[email protected]:8332")

arglength = len(args.BTCAddresses)
print "You have supplied", arglength, "BTC Addresses"

amount_of_btc = bitcoin.getbalance()
print "You have", "{:.8f}".format(float(amount_of_btc)), "BTC in your wallet"

send_to_each = float("{0:.8f}".format(amount_of_btc)) / arglength

print "Thats", float("{0:.8f}".format(send_to_each)), "BTC to be sent to each address"
print " "

for address in args.BTCAddresses:
        bitcoin.sendtoaddress(address, send_to_each)
        print send_to_each, "BTC sent to", address


Just add this to a crontab to run at a certain time and your done Smiley

Hope this helps. Feel free to donate to my house buying fund - 15wHuCKGCsRs7D3WSQEs1H7V9NVxwa8JrL Smiley
sr. member
Activity: 392
Merit: 250
September 22, 2014, 05:24:53 AM
#4
You have to setup a headless bitcoind server if you on windows.
Check this guide there's a video embedded there watch it that might give you some idea.
full member
Activity: 123
Merit: 104
September 22, 2014, 05:18:07 AM
#3
Hi, looking for some advice on setting up automatic payments to multiple addresses once per day.

Each address would count as a percentage and the total funds in wallet at end of day would be sent.

Any ideas?

Setup a server, run a commandline wallet client (daemon). It is easy to interact with the wallet via either the commandline interface or RPC calls, using any number of programming languages.
hero member
Activity: 826
Merit: 500
September 20, 2014, 01:57:29 AM
#2
Hi, looking for some advice on setting up automatic payments to multiple addresses once per day.

Each address would count as a percentage and the total funds in wallet at end of day would be sent.

Any ideas?

Did you find out any info for this?
sr. member
Activity: 446
Merit: 250
April 07, 2014, 02:24:19 AM
#1
Hi, looking for some advice on setting up automatic payments to multiple addresses once per day.

Each address would count as a percentage and the total funds in wallet at end of day would be sent.

Any ideas?
Jump to: