Created
November 5, 2015 00:57
-
-
Save zQueal/0c467f9a949328ef41a0 to your computer and use it in GitHub Desktop.
FishShell function to pull BTC price and watch current BTC buy/sell prices. Requires httpie and jq.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function btc --description 'show the current buy/sell price of btc based on Coinbase prices' | |
| http GET https://api.coinbase.com/v2/prices/buy | jq '{buy: .data.amount}' | |
| http GET https://api.coinbase.com/v2/prices/sell | jq '{sell: .data.amount}' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function watch_btc --description 'displays buy/sell every 5 minutes' | |
| while true | |
| btc | |
| sleep 300 | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment