Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time



Gets BTC:USD prices from Coinbase, CampBX, and Coinsetter. You can also buy bitcoins via Coinbase if an API key is provided.


Run pip install -r requirements.txt to install the requests library

Run to initialize a configuration file and input your Coinbase API key.

Showing current rates

Run btc by itself to show current rates from Coinbase, CampBX, and Coinsetter. The CampBX price is bolded and in blue on *NIX systems.

All rates (in non-realtime mode) are retrieved asynchronously to speed up the program. However, I haven't added locks yet to deal with printing to stdout at the same time so the formatting may occasionally be a little bit messed up. Use btc --no-async to run it slowly with all formatting intact.

Or use btc --realtime <number of seconds> to update the ticker continuously. If the number of seconds is left out, the default is every 300 seconds (5 minutes).

Realtime BTC ticker in the command line

Buying Bitcoins via Coinbase

Run btc --buy <number of bitcoins> to buy bitcoins via Coinbase. The default number of bitcoins to buy is one. It will tell you the latest price on Coinbase, give you your total, and prompt for confirmation. The response with the order confirmation is output to the terminal in JSON (save this output just in case). Many times it will fail though due to an internal Coinbase limit.

Use btc --buy <number of bitcoins> --dry-run to simulate buying coins and show you the HTTP request that will be sent without actually sending it.

Possible future features

  • [DONE] Making a realtime ticker of prices that will update itself periodically on the command line
  • Implementing more of the Coinbase API

Help Info

usage: [-h] [--buy [BUY]] [--dry-run] [--verbose] [--no-async]
			  [--realtime [REALTIME]]

Buy BTC or Show BTC:USD rates

optional arguments:
  -h, --help            show this help message and exit
  --buy [BUY]           Buy BTC
  --dry-run             Simulate buying BTC but do not actually buy anything
  --no-async            Get prices one by one (slower but formatting is
  --realtime [REALTIME]
						Show realtime ticker refreshing every REALTIME seconds
						(Only on UNIX)


This program uses Python 3


GPL Version 3


Gets BTC:USD prices from Mt Gox, Coinbase Buy/Exchange, and CampBX. Can also buy bitcoins via Coinbase if an API key is provided.







No releases published


No packages published