dotfiles/.local/scripts/bbl/0060_30_ETCUSDT

10 lines
288 B
Bash
Executable File

#!/bin/bash
COLOR1="#AAAAAA"
COLOR2="#444444"
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=ETCUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
echo "^b$COLOR1^^c$COLOR2^ ETC ^c$COLOR1^^b$COLOR2^ \$$price ^d^"