create account

STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users. by spaced

View this thread on: hive.blogpeakd.comecency.com
· @spaced ·
STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users.
# STEEM Autovote Bot

Introduction
=====================

[STEEM Autovote](https://github.com/matthewniemerg/python-steem-autovote) is a simple autovoting solution for [STEEM](https://steemit.com/) users.  Features include :

* Simple, customizable [YAML](http://www.yaml.org) configuration file.
* Allows users to monitor multiple accounts and autovote posts (not comments)
* Multiple accounts can autovote any monitored account
* Monitored accounts can be autovoted immediately or within a random time frame for each voting account
* Monitored accounts can be autovoted with a prescribed frequency for each voting account
* Upvotes only

Dependencies
=====================

STEEM Autovote has only two dependencies: [PyYaml](http://pyyaml.org/) and
[Requests](http://docs.python-requests.org/).
On [Ubuntu](http://www.ubuntu.com/), these dependencies
can be installed with the following command:

```
sudo apt-get install python-yaml python-requests
```

Depending on your system's python configuration, additional python packages may need to be installed.
First, we will need to install python's pip.

```
sudo easy_install pip
```

Once pip is installed, we can install the other packages.  This is accomplished with the following command:

```
sudo pip install python-dateutil
```


Configuration
=====================

Example configuration files are provided in the `Examples` directory as `example1.yaml` and `example2.yaml`.
The configuration file is specified when calling the `autovote-bot.py` script:

```
python autovote-bot.py /home/username/autovote/autovote.yaml
```

Editting the yaml file may be difficult at first, but the rules are quite easy to remember.

* Do not allow for tabbed spaces, only single character white spaces and hard carriage returns.
* New accounts to monitor are added in the monitor section.
* Allow for two additional white spaces for each sub-list.
* The outermost list is the account to monitor.
* Voting ccounts of a monitored account are items in the sub-list of a monitored account.
* Two entries are required in the sub-list for each voting account: random_wait and frequency.


Example Configuration File
======================

```
settings :
  wallet_password : walletpword
  rpc_ip : "127.0.0.1"
  rpc_port : 8091
  rpc_user : "rpcuser"
  rpc_password : "rpcpassword"
  log_file : "autoupvote.log"
  debug : true
  monitor :
    complexring :
      your_account_name :
        random_wait : 0 # random wait time, anytime from 0 to 0 seconds
        frequency : 1 # probability that a vote will occur
      your_sock_puppet_account :
        random_wait : 100 # random wait time, anytime from 0 to 100 seconds
        frequency : .1 # probability that a vote will occur
    your_account_name :
      your_account_name :
        random_wait : 0 # random wait time, anytime from 0 to 0 seconds
        frequency : 1 # probability that a vote will occur
      your_sock_puppet_account :
        random_wait : 60 # random wait time, anytime from 0 to 60 seconds
        frequency : .5 # probability that a vote will occur
    your_sock_puppet_account :
      your_account_name :
        random_wait : 1200 # random wait time, anytime from 0 to 1200 seconds
        frequency : .333 # probability that a vote will occur
      your_sock_puppet_account :
        random_wait : 0 # random wait time, anytime from 0 to 0 seconds
        frequency : 1 # probability that a vote will occur
```

Random Settings
===================

The block_id hash of the post of a monitored account is used as a seed in python's Mersennes Twister Pseudo Random Number Generator.  This seed gets updated for each new post of any monitored account.


Running STEEM Autovote Bot
===================

Running the autovote-bot script requires an open wallet, an instance of `cli_wallet` must be run as a daemon process, listening on an RPC port.  On Ubuntu,
this is best achieved using [Upstart](http://upstart.ubuntu.com/) services.

Please see [this guide](https://github.com/steemed/steem-price-feed/) for starting an upstart service for your cli_wallet.

Alternatively, you can run `cli_wallet` in an instance of a screen.

After installing `screen` type

`screen`

and then once you return to the shell, navigate to the cli_wallet directory and then type

```./cli_wallet -u user -p password --rpc-endpoint=127.0.0.1:8091 -d 2>cli-debug.log 1>cli-error.log```

Detach the screen with `Ctrl + a` and then `Ctrl + x` and you now have a `cli_wallet` daemon running.

There are at least 2 ways you can run the STEEM Autovote Bot.

* Use `screen` and navigate to the appropriate directory, and then run this process in the screened shell with `python autovote-bot.py autovote.yaml`
* Use an upstart service



Running as an Upstart Service
===================

It is highly desirable to run the STEEM Autovote Bot as an upstart service so that on reboot and termination, a respawn of the process will occur.

Save the following script in `/etc/init/steem-autovote-bot.conf` (editted for your own system)

```
# steem-autovote-bot service - steem-autovote-bot service for user

description "STEEM Autovote bot"
author "Ima User <user@example.com>"

# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: //upstart.ubuntu.com/wiki/Stanzas

# When to start the service
start on runlevel [2345]

# When to stop the service
stop on runlevel [016]

# Automatically restart process if crashed
respawn

# Essentially lets upstart know the process will detach itself to the background
# This option does not seem to be of great importance, so it does not need to be set.
# expect fork

# Specify working directory
chdir /home/user/path/to/steem-autovote

# Specify the process/command to start, e.g.
exec /usr/bin/python autovote-bot.py autovote.yaml 2>autovote-debug.log 1>autovote-error.log
```

Upcoming Features
==================

* Upvote with weights
* Downvote with weights
* Random Interval (not just from 0 to random_wait)
* Tracking of when (auto)votes occurred and adjusting times to vote to maximize voting power for both immediate votes and queued votes

Acknowledgments
===================

I have heavily modified the STEEM witness [steemed's](https://steemit.com/witness-category/@steemed/steemed-witness-thread) source code for creating a [STEEM Price Feed](https://github.com/steemed/steem-price-feed/).
👍  , , , , , , , , , , , , , , , , ,
👎  , , , , , , , , , , , , , , , , ,
properties (23)
authorspaced
permlinksteem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users
categorysteem
json_metadata{"tags":["steem"],"links":["https://steemit.com/witness-category/@steemed/steemed-witness-thread"]}
created2016-07-11 23:26:27
last_update2016-07-11 23:26:27
depth0
children11
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6,385
author_reputation5,400,679,240,242
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,408
net_rshares-24,034,265,146,188
author_curate_reward""
vote details (36)
@amihay ·
properties (23)
authoramihay
permlinkre-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users
categorysteem
json_metadata{}
created2016-08-08 07:20:12
last_update2016-08-08 07:20:12
depth1
children0
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11
author_reputation1,271,791,839,323
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id678,377
net_rshares-396,068,855
author_curate_reward""
vote details (5)
@berniesanders ·
And, down you go...  I'll be watching you!
👍  ,
👎  
properties (23)
authorberniesanders
permlinkre-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160712t023100821z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-12 02:31:00
last_update2016-07-12 02:31:00
depth1
children1
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length42
author_reputation600,251,775,828,524
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,342
net_rshares147,215,448
author_curate_reward""
vote details (3)
@recursive · (edited)
Just realized this isn't original content. Disregard previous post.
properties (22)
authorrecursive
permlinkre-berniesanders-re-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160712t023833462z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-12 02:37:36
last_update2016-07-12 02:42:33
depth2
children0
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation14,577,151,751,433
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,362
net_rshares0
@fonzerrellie ·
I'd rather people upvoted thing's because they found the posts interesting, important etc etc 

lol this was bound to happen tho
👍  ,
properties (23)
authorfonzerrellie
permlinkre-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160711t232952152z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-11 23:29:48
last_update2016-07-11 23:29:48
depth1
children0
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length128
author_reputation801,199,558,323
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,428
net_rshares238,106,999
author_curate_reward""
vote details (2)
@kenny-crane ·
$2.27
This is a copy and paste from an article on steemit from 2 months ago:
https://steemit.com/steem/@complexring/steem-autovote-bot
I am down voting.  It it turns out I am mistaken I will remove my down vote.
👍  , , , , , ,
properties (23)
authorkenny-crane
permlinkre-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160711t233555421z
categorysteem
json_metadata{"tags":["steem"],"links":["https://steemit.com/steem/@complexring/steem-autovote-bot"]}
created2016-07-11 23:35:39
last_update2016-07-11 23:35:39
depth1
children4
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value2.060 HBD
curator_payout_value0.205 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length205
author_reputation233,810,978,356,290
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,475
net_rshares9,114,482,408,753
author_curate_reward""
vote details (7)
@kilrathi ·
Good catch.  Doing the same. You can see in the Examples dir there's a "complexring" configuration set too. :P
👍  
properties (23)
authorkilrathi
permlinkre-kenny-crane-re-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160711t234040458z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-11 23:40:42
last_update2016-07-11 23:40:42
depth2
children1
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length110
author_reputation1,442,906,808,611
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,504
net_rshares67,603,512
author_curate_reward""
vote details (1)
@kenny-crane ·
@dantheman has upvoted this, so I am questioning myself.  We'll see how it plays out.  I admit I may be wrong and will correct my vote if I am.
properties (22)
authorkenny-crane
permlinkre-kilrathi-re-kenny-crane-re-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160711t234251812z
categorysteem
json_metadata{"tags":["steem"],"users":["dantheman"]}
created2016-07-11 23:42:36
last_update2016-07-11 23:42:36
depth3
children0
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length143
author_reputation233,810,978,356,290
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,511
net_rshares0
@spaced ·
Sorry, take no offense, I was testing API code :) I should have sent it to spam, was not aware that was a category.
👍  
properties (23)
authorspaced
permlinkre-kenny-crane-re-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160712t012140387z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-12 01:21:39
last_update2016-07-12 01:21:39
depth2
children1
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length115
author_reputation5,400,679,240,242
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,050
net_rshares85,484,996,004
author_curate_reward""
vote details (1)
@kenny-crane ·
No offense taken at all :-)  I may be testing some API code in the future and expect to have something similar happen to me at some point!  I've seen and up voted some of your other quality posts.  Glad to have you here on steemit!
properties (22)
authorkenny-crane
permlinkre-spaced-re-kenny-crane-re-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160712t014510140z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-12 01:45:09
last_update2016-07-12 01:45:09
depth3
children0
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length231
author_reputation233,810,978,356,290
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,165
net_rshares0
@kilrathi ·
404 on the GitHub project link.
👍  
properties (23)
authorkilrathi
permlinkre-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160711t233104544z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-11 23:31:06
last_update2016-07-11 23:31:06
depth1
children1
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation1,442,906,808,611
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,440
net_rshares66,195,106
author_curate_reward""
vote details (1)
@kilrathi ·
https://github.com/matthewniemerg/steem-autovote-bot
👍  
properties (23)
authorkilrathi
permlinkre-kilrathi-re-spaced-steem-autovote-bot-steem-autovote-is-a-simple-autovoting-solution-for-steem-users-20160711t233307644z
categorysteem
json_metadata{"tags":["steem"],"links":["https://github.com/matthewniemerg/steem-autovote-bot"]}
created2016-07-11 23:33:09
last_update2016-07-11 23:33:09
depth2
children0
last_payout2016-08-22 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length52
author_reputation1,442,906,808,611
root_title"STEEM Autovote Bot - STEEM Autovote is a simple autovoting solution for STEEM users."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,458
net_rshares66,195,106
author_curate_reward""
vote details (1)