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.

24 lines
1.3 KiB

4 days ago
  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 '.pairs[0].marketCap / 1000000000 | . as $marketCap | "\($marketCap | floor).$(($marketCap * 10 | floor % 10))"')
  5. #price=$(echo "$raw" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )B"')
  6. #curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )"'
  7. curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )"' | jq -r 'tostring | gsub("\\.";"")'
  8. # if (( $(echo "$price < .05" | bc -l) )); then
  9. # printf "%0.4f\n" "$price" | cut -c 4-
  10. # elif (( $(echo "$price < .1" | bc -l) )); then
  11. # printf "%0.3f\n" "$price" | cut -c 4-
  12. #if (( $(echo "$price < .09" | bc -l) )); then
  13. #printf "%0.4f\n" "$price" | cut -c 4-
  14. #elif (( $(echo "$price < .1" | bc -l) )); then
  15. #printf "%0.3f\n" "$price" | cut -c 4-
  16. #elif (( $(echo "$price < 1" | bc -l) )); then
  17. #printf "%0.3f\n" "$price" | cut -c 3-
  18. #elif (( $(echo "$price < 10" | bc -l) )); then
  19. #printf "%0.2f\n" "$price"
  20. #fi