Improved version: BASH Script to Query and Monitor the Crypto Prices (Exchange Rate to Fiat)
Here is a quick BASH script that allows you to do something like this:
./ticker
e.g. ././ticker steem usd
./ticker steem usd
"1 steem = 0.21412699896499998 usd"
./ticker 2 steem gbp
"2 steem = 0.3794 gbp"
./ticker eth 2 btc
"26.331085755738364 eth = 2 btc"
#!/bin/bash
check_json=$(echo "{ }" | jq)
if [ "$check_json" != "{}" ]; then
echo "jq not installed"
exit 1
fi
if [ "$1" == "" ]; then
echo "e.g. ./$0 steem usd"
fi
API="https://price.justyy.workers.dev/query/"
curl -s -X POST -d "$*" $API | jq .result[0]
This requires the jq to parse the JSON output from the Crypto API made by @justyy (myself) on cloudflare workers serverless technology.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you for reading ^^^^^^^^^^^^^^^
NEW! Following my Trail (Upvote or/and Downvote)
Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
https://steemyy.com
My contributions
- Video Downloader
- Steem Blockchain Tools
- Free Cryptos API
- VPS Database
- Computing Technology Blog
- A few useless tools
- And some other online software/tools
- Merge Files/Videos
- LOGO Turtle Programming Chrome Extension
- Teaching Kids Programming - Youtube Channel and All Contents
Steem/Swap to USDT Swap
I also made this Super Easy/Handy Service to Convert your STEEM or SBD to USDT (TRC-20)
Delegation Service
Voting Power Considered in Voting Schema and Important Update of Delegation Service!
Support me
If you like my work, please:
- Buy Me a Coffee, Thanks!
- Become my Sponsor, Thanks!
- Voting for me:
https://steemit.com/~witnesses type in justyy and click VOTE
- Delegate SP: https://steemyy.com/sp-delegate-form/?delegatee=justyy
- Vote @justyy as Witness: https://steemyy.com/witness-voting/?witness=justyy&action=approve
- Set @justyy as Proxy: https://steemyy.com/witness-voting/?witness=justyy&action=proxy
Alternatively, you can vote witness or set proxy here: https://steemit.com/~witnesses
Awesome! Are you able to explain a little about how the prices on your endpoint are calculated?
And, very stylish use of jq!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The API is at https://price.justyy.workers.dev/ basically I get prices from a few exchanges, and do the average.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Is it the same exchange set as the pricefeed repo (Bittrex, Poloniex and Binance) or a more extensive set?
It would be great to do our own volume-weighted prices from Steem's top 90% volume exchanges (as per "Option B" in my recent price feed post).
I'd be happy to help with implementing additional exchange APIs, just let me know :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Sure, sounds like a good plan
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This post has been featured in the latest edition of Witness Weekly...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks! !thumbup
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for everything
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hello @pennsif! You are superb!
command: !thumbup is powered by witness @justyy and his contributions are: https://steemyy.com
More commands are coming!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit