Python 3 Twitter Bot
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Python 3.4.2 | tweepy 3.5.0

Python Logo Twitter and Bitcoin Pi Zero

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.

Installation and Setup

1. Set Up Auth

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

2. Install Dependencies

Currently there is one dependency you need to install pip:

$ pip3 install -r requirements.txt

3. Add to Cron

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>/

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

Follow my twitter bot


Copyright and License

Copyright (c) 2018 Josh Sisto MIT License