Top CryptoCurrency with PowerShell

I have seen lot of people and fellow PowerShell bloggers and community contributors interest in CryptoCurrency with PowerShell console in recent months and I’m thinking add my 2 cents. So today in this blog post we going to discuss how to plot historical data (prices) of Top CryptoCurrency in the PowerShell console, where you can visualize the price trends of each cryptocurrency like BitCoin [BTC], Ethereum [ETH] etc with each other. But, let me tell you that: IT IS SUPER EASY! 🙂

Video Tutorial

Capturing the price trend of CryptoCurrency with PowerShell

First thing you need is the name and symbol of top crypto currencies in the world, so here is a list of some:

Name Symbol LiteCoin LTC Ethereum ETH BitCoin BTC ZCash ZEC Dash DASH Ripple XRP BitCoin Cash BCH

Install-Module Coin -Force

Once we have the list of target currencies, then we have to figure out a way to retrieve historical data of each of these CryptoCurrencies. After little bit of googling I found a PowerShell module: Coin that can get the Price history of the CryptoCurrencies by leveraging the. This module is written by Matt McNabb and you can download this module from PowerShell Gallery using a PowerShell console with Administrative rights:

Now, if you use the the cmdlet: Get-CoinPriceHistory from the module with a currency symbol like BTC, it returns the price trend in the given time frame. Then all you need to do is capture the value of the daily market closing price over a period of time, like in the following code sample:

Plotting CryptoCurrency with PowerShell

Next task is to store this daily closing price in an array variable and display it in a chart to actually visualize the price trend over a period of time. Good for you that I’ve written a Open-Source, Platform independent PowerShell module: Graphical , that has capability to consumes data points as input and plots them on a 2D graph [Scatter / Bar / Line] on the PowerShell Console/Terminal like in the below screen shot:

You can also install the module from PowerShell Gallery using the command: Install-Module Graphical and then plot the data points we captured using the Show-Graph cmdlet from the Graphical module

Lets try to plot graphs all the Top CryptoCurrency just like in our previous example and add proper Y-Axis step so that graphs fit in my console with name of currency as the title of each plotted graph.

and here we go…. SWEEEET!

My New Book : PowerShell Scripting Guide to Python

﻿