Bitcoin Forum
June 14, 2024, 04:52:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A Simple python program to autosend a wallets balance(VPS mining FTW)  (Read 1019 times)
hendo420 (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile WWW
December 27, 2013, 12:58:07 AM
 #1

https://github.com/hendo420/Bitcoin-Autosend

I was bored today so I made a program for all of those solo VPS miners out there.

Its stupid simple. Here is the source.
Code:
#!/usr/bin/python
  
import bitcoinrpc
import sys, time
  
serverIP = '127.0.0.1'
serverPort = '1069'
user = 'username'
password = 'password'
address = 'AddressToSendCoinTo'
fee = 0.001

conn = bitcoinrpc.connect_to_remote(user, password, host=serverIP, port=serverPort);
  
while True:

    balance = conn.getbalance()
    print 'Your current balance is', balance
  
    if balance > fee:
        adjbalance = float(balance) - float(fee)
        print 'Sending', adjbalance, 'to your designated address'
      
        try:
            conn.sendtoaddress(address,adjbalance)
        except Exception:
            pass
            print 'Coin send fail'
  
    time.sleep(3)

Just add in your RPC port, username, password, and address to send coins to.
Optionally change the serverIP to your VPS's IP if you are running the program from a remote PC.
You should also change the fee to match the coin you are mining.


Enjoy!  Cheesy Cheesy Cheesy

ebmarket.co
traxx187
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
December 27, 2013, 01:03:40 AM
Last edit: December 28, 2013, 06:42:07 PM by traxx187
 #2

Pretty cool man

Reserved selling spot for CatCoins PM me

XpyBlackJack.com Come Play!!!

XPY - PWcoJWsCrumYrXCFW2P9KYAgqH9JbcczU9

FlappyCoin is back : FNtF5X1uGW66LGNaMdULcQwVZtpPNmHkFU

Come BTCPonziGame.net!! Over 80+ BTC Invested!
hendo420 (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile WWW
December 27, 2013, 02:24:23 AM
 #3

Reserved

ebmarket.co
glorycoin
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
December 28, 2013, 07:11:01 PM
 #4

jgarzik's python-bitcoinrpc (https://github.com/jgarzik/python-bitcoinrpc produces following error:

AttributeError: 'module' object has no attribute 'connect_to_remote'

Which bitcoinrpc python library do you suggest?

Thanks
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!