Python 3.4.2 | tweepy 3.5.0
This twitter bot uses the coindesk API to tweet the current bitcoin price and the price of bitcoin last year.
The code is written in Python 3 and uses the Tweepy python library to send tweets. Currently running on my raspberry pi.
The authentication keys for the different APIs are stored in the credentials module
Log in to your Twitter account and
create a new application. Under the Keys
and Access Tokens tab for your app you'll find
the Consumer Key and Consumer Secret. Update credentials
with your
Consumer Key and Consumer Secret
If you want the tweets to come from the same account that owns the application,
simply use the Access Token and Access Token Secret on the same page. If
you want to tweet from a different account, follow the
steps to obtain an access token. Then
update credentials
with your Access Token and Access Token Secret
Currently there is one dependency you need to install pip:
$ pip3 install -r requirements.txt
Add script to cron
$ sudo crontab -e
Add the line below to cron and then press ctrl+x to exit and y to save
0 8,20 * * * python3 <location to your script>/tweetBTC.py
The line above will execute the script at 8AM and 8PM everyday
Note: Make sure to update <location to your script>
with the path to your script.
For example: /home/pi/bitcoin_tweeter
Copyright (c) 2018 Josh Sisto MIT License