Monitors crypto/stock prices & volatility and plays an alert sound when a target is reached.
- It will also send a desktop notification on Linux or MAC OSX.
- Run via
pythonin a terminal or use the optional GUI.
Note
Stock prices utilize Finnhub free API (email sign-up required)
Crypto prices utilize the CoinGecko open API but may be rate limited occasionally.
(optional) If you want to use free/demo CoinGecko API key use
export COINGECKO_API_KEY="your_API_key"
Important
If you are using a pro/paid CoinGecko API key use
export COINGECKO_PRO_API_KEY="your_PRO_API_key"
free/demo and paid API keys use different urls, so goldteeth will choose whichever is better from what you have defined.
python src/goldteeth_cli.py <symbol> <mode> <target> <wav>python src/goldteeth_cli.py btc above 100000 src/goldteeth/alert.wav
python src/goldteeth_cli.py eth below 3000 src/goldteeth/alert.wavpython src/goldteeth_cli.py sol vol 10-5 src/goldteeth/alert.wav # 10% move in 5 mins
python src/goldteeth_cli.py doge vol 5-15 src/goldteeth/alert.wav # 5% move in 15 mins
python src/goldteeth_cli.py tsla vol 5-10 src/goldteeth/alert.wav # 5% move in 10 mins- Requires a Finnhub API key (free, email sign-up)
export FINNHUB_API_KEY="your_key_here"
python src/goldteeth_cli.py tsla above 400 src/goldteeth/alert.wav- With the free API key Finnhub still limits you to one websocket connection.
- Goldteeth tries to work around this with recovery loops and HTTP fallback and will keep trying if using multiple instances.
- If you see this error it's due to free API limits, if you have a paid API key then you shouldn't see limits.
WebSocket error: Connection to remote host was lost.
WebSocket closed
- Modify
CRYPTO_INTERVALto adjust crypto polling frequency (default: 60s) - Modify
STOCK_INTERVALto adjust stock ticker polling frequency (default: 120s) - Modify
SHOW_WS_ERRORSto show/hide websocket errors for stocks (default: False)
- Python 3 with these libraries:
requestsorpython3-requestspytzorpython3-pytz(stocks only)websocketsorpython3-websockets(stocks only)
- mpv or mplayer (audio alerts)
- Right now the GUI is not available via
pip install
python src/goldteeth_gui.py- There are two ways to Goldteeth:
- Clone repositry and run (ensure Python libraries are present)
pip install
python -m venv goldteeth
. !$/bin/activate
pip install goldteethalert.wavis included but you can pass your own audio file.
goldteeth btc below 88000git clone https://github.com/sadsfae/goldteeth.git
cd goldteethpython src/goldteeth_cli.py tsla below 400 src/goldteeth/alert.wav
python src/goldteeth_cli.py btc vol 5-60 src/goldteeth/alert.wav- First make sure you have the repository cloned.
- Be inside the repository directory.
cat > goldteeth.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=Goldteeth
Comment=Monitor crypto and stock prices
Exec=$(which python3) $(pwd)/src/goldteeth_gui.py
Path=$(pwd)/
Icon=utilities-system-monitor
Terminal=false
Type=Application
Categories=Utility;Finance;
EOFmkdir -p ~/.local/share/applications/
mv goldteeth.desktop ~/.local/share/applications/
chmod +x ~/.local/share/applications/goldteeth.desktop
update-desktop-database ~/.local/share/applications/- Goldteeth should now appear in your Applications menu in your favorite Desktop Environment.


