Skip to content

Instantly share code, notes, and snippets.

@PrateekKumarSingh
Last active December 3, 2018 22:40
Show Gist options
  • Save PrateekKumarSingh/ff39c43cd6b636b0506be09f969b8efb to your computer and use it in GitHub Desktop.
Save PrateekKumarSingh/ff39c43cd6b636b0506be09f969b8efb to your computer and use it in GitHub Desktop.
# install the modules from PowerShell Gallery
Install-Module Graphical, Coin -Force
$Date = Get-Date
# define parameters for splatting
$param = @{
FromSymbol ='BTC'
ToSymbol ='USD'
DataInterval ='Day'
Since = $Date.AddDays(-30)
Until = $Date
}
# capture the market closing price for 30 days
$BTC = Get-CoinPriceHistory @param | ForEach-Object Close
Show-Graph -Datapoints $BTC -GraphTitle 'BitCoin [USD]' -YAxisStep 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment