See bitcoin price from website "preev.com" next to date and time on Ubuntu 18.04
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I have all privileges on my Linux Ubuntu 18.04 laptop.

"The day of the week from current date" and "time" are displayed on top-center of the desktop
I need a step by step tutorial on how, as a system administrator, I can make it also display the bitcoin price from the website preev.com.

I should also be able to set the time between updating of that information. I think every 3 seconds would be fine but would be nice to know how to change that, if I want.
It should have a pipe symbol between date/time and bitcoin price and say: "One bitcoin is worth: $", followed by the price, and then the text: " USD".

I want it to be a permanent feature that doesn't go away when I reboot.

Please share an image of your desktop.
mashtullah 8 months ago
I assume you mean in the taskbar. And by your description i assume that you are using Gnome. Then unfortunately I have bad news as Gnome does not feature taskbar widgets to my knowledge.
poldi1405 8 months ago
preev.com doesn’t have an API. Scraping the data from the site isn’t reliable and can stop working at any time.
da2x 8 months ago
awarded to da2x

Crowdsource coding tasks.

2 Solutions


It depends on your Desktop Environment and tools used to display information on desktop.

Anyway, weighted average of BTC price in USD using curl, bash, awk and jq can be fetched using following command:

curl -s "http://preev.com/pulse/units:btc+usd/sources:bitstamp+kraken" |\
jq -r ".btc.usd[][]" |\
sed '$!N;s/\n/ /' |\
awk '{w = w + $2; e = e + $1 * $2;} END {print e/w}'

To display formatted text in console you can use following code:

BTC_PRICE=$(curl -s "http://preev.com/pulse/units:btc+usd/sources:bitstamp+kraken" |\
jq -r ".btc.usd[][]" |\
sed '$!N;s/\n/ /' |\
awk '{w = w + $2; e = e + $1 * $2;} END {print e/w}'); echo "$(date) | One bitcoin is worth: \$$BTC_PRICE USD"
This solution doesn't solve the requirements. Cannot accept this as a solution.
remotemass 8 months ago
This might help as well. I think tweaking with "clock override" will do it! https://github.com/stuartlangridge/gnome-shell-clock-override
remotemass 8 months ago
I found a ubuntu extension app that solved my problem: "BitTicker: A live bitcoin-USDT ticker for your system tray". BitTicker is pretty much what I need. Problem solved. If you find an elegant solution or tip to add I may award you the bounty. I will decide.
remotemass 8 months ago
Winning solution

You can use the Bitcoin Markets GNOME extension. It should fulfill your needs. If you’re new to GNOME extensions then check out this page.

View Timeline