Skip to content

Instantly share code, notes, and snippets.

View mattvukas's full-sized avatar

Matt Vukas mattvukas

View GitHub Profile
@mattvukas
mattvukas / bitcoinShellTicker.py
Last active May 22, 2020 05:04
A simple Python script that queries the Bitstamp API every 5 seconds and prints the last USD/Bitcoin price to the shell. Requires the Python Requests library.
# /usr/bin/python3
import requests
import json
from time import sleep
def getBitcoinPrice():
URL = "https://www.bitstamp.net/api/ticker/"
try:
r = requests.get(URL)
@mattvukas
mattvukas / bitcoinAdafruitLcdTicker.py
Last active July 1, 2016 17:12
Python script for the Raspberry Pi, which fetches the last Bitcoin price via the Bitstamp API, then outputs the quote to an attached Adafruit LCD screen (http://www.adafruit.com/products/1110).
"""
bitcoinAdafruitLcdTicker.py
Tested with Python 2.7.3
Libraries required:
- Requests
http://docs.python-requests.org/en/latest/
- Adafruit LCD library
https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code