Tag

jq

Get the price of Bitcoin from command line

By | Bitcoin | No Comments

This is the easiest way to get the price of Bitcoin from the command line or terminal.

Pre-requisuites : jq
Install : apt-get install jq

Get the price of Bitcoin from command line

curl -s https://api.binance.com/api/v1/ticker/24hr | jq -cr '.[] | select(.symbol == "'"BTCUSDT"'") | .lastPrice'