This is a nice one-liner, it will return the current Bitcoin price in USD.
┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5] └─$ curl -s usd.rate.sx/btc?T | grep avg: | awk '{ print $2}' |
This is the script in action.
┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5] └─$ curl -s usd.rate.sx/btc?T | grep avg: | awk '{ print $2}' $42539 |
Use it like this to get the current price in British Pounds.
┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5] └─$ curl -s gbp.rate.sx/btc?T | grep avg: | awk '{ print $2}' £31138 |
Just access the site using curl like this to see a not so good graph of the Bitcoin price over time. This is not looking good.
┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5] └─$ curl -s usd.rate.sx/btc?T ▶ Bitcoin (BTC) ▶ Mon 17 +1d -1.47% │ 43000.0 │ ⢣ ⡄ ⢠⠋⢇ │ ⢣⡀⡘⠱⠳⠐ ⢸ │ ⠈ ⡇ ⣀⢀ ⡀⡀ ⣠ │ ⠃⣀⡰⠄⠄ ⡜⢢⢠⠃⠸⡀ ⡸⠘⢱⠔⠉⠦⡀⣴⢀ │ ⠁ ⠑⡇ ⡇ ⠁ ⢣⡄⡇ ⠣⡇⠁⢣⡴ │ ⡇ ⢸ ⢱⡇ ⠘⠁⡇ ⣾ ⢀⢸⢱ │ ⡇ ⡜ ⠘ ⢸⢐⠙⡄⡜⣶⠉⠇⠸⡀ ⡀ │ ⢸ ⡤⠃ ⠏ ⠣⠃⠁ ⡇⡸⢱ │ ⢸⢀⠇ ⠈ ⠘⠁⢸ │ ⢸⡸ ⠘⢴ │ ⠈⠁ ⢸⢠ │ ⢸⢸⡄ │ ⡇⠧⡀ ⢀⣀⠇ │ ⠃ ⢱ ⡠⠊⡆⡀ ⡎ │ ⡆ ⡸⣼ ⡇ ⢀⡇⢠⡆⡤⢓⡆ │ ⢣⢰⢸ ⡰⠃⠋ ⠑⠤⡀ ⢸⢸⡔⠹⠁ ⠁ │ ⠈⠇⠈⡆ ⡇ ⢱ ⢸⠘⠁ │ ⠸⡀⡜ ⠘⡄ ⡸ │ ⠱⠃ ⡇ ⡇ │ ⢸ ⡇ │ ⠈⡆ ⡇ │ ⠇ ⡇ │ ⢣⡄⢀⠇ │ ⠘⠸⣸ │ ⠿ │ 41700.0 └──────────────────────────────────────────────────────────────────────────────── begin: $43001 (Mon 17 01:00) // end: $42369 (Tue 18 00:50) high: $43008 (Mon 17 03:10) // low: $41680 (Mon 17 22:20) avg: $42539 // median: $42344 // change: -631.78 (-1.47%) Use @ for interval specification: /btc@10d, /eth@4w, /xrp@January (more in /:help) |
This should be very useful for a Bitcoin fan. But is it on the last legs in 2022? Is it time to admit that digital currency is quite volatile? Are NFT`s the next thing to sink?