Created
February 2, 2017 18:14
-
-
Save Thorium/d8cd4bb0610a8cb978591b3134100fc0 to your computer and use it in GitHub Desktop.
Bitcoin current price data from blockchain.info
This file contains 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
//Using FSharp.Data | |
type BtcData = FSharp.Data.JsonProvider<"""{ | |
"USD":{"15m":1.1,"last":1.1,"buy":1.1,"sell":1.1,"symbol":"$"}, | |
"EUR":{"15m":1.1,"last":1.1,"buy":1.1,"sell":1.1,"symbol":"€"}, | |
"GBP":{"15m":1.1,"last":1.1,"buy":1.1,"sell":1.1,"symbol":"£"} | |
}"""> | |
let prices = BtcData.Load("https://blockchain.info/ticker") | |
//prices.Eur.Buy : val it : decimal = 923.52M (at 02/02/2017) | |
//prices.Gbp.Sell : val it : decimal = 794.61M (at 02/02/2017) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment