Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
597 B

  1. # /bin/bash
  2. # curl -s https://api.dexscreener.com/latest/dex/pairs/$1/$2| jq -r '.pairs | .[] | .priceUsd'
  3. raw=$(curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2")
  4. price=$(echo "$raw" | jq -r ".pairs | .[] | .priceUsd")
  5. # if (( $(echo "$price < .05" | bc -l) )); then
  6. # printf "%0.4f\n" "$price" | cut -c 4-
  7. # elif (( $(echo "$price < .1" | bc -l) )); then
  8. # printf "%0.3f\n" "$price" | cut -c 4-
  9. if (( $(echo "$price < .09" | bc -l) )); then
  10. printf "%0.4f\n" "$price" | cut -c 4-
  11. elif (( $(echo "$price < .1" | bc -l) )); then
  12. printf "%0.3f\n" "$price" | cut -c 4-
  13. fi