How to retrieve Bitcoin price via CMD using API service


Run CMD
curl https://api.coinbase.com/v2/prices/BTC-USD/buy
Pretty useful if you wish to retrieve some latest price every few seconds using a .bat script.

If you wish to log the data in a .txt file you could do the following command.
cd Desktop
curl https://api.coinbase.com/v2/prices/BTC-USD/buy -o btc.txt
And now, you can find the btc.txt located on your Desktop.



Comments

Popular Posts