Created
September 4, 2018 12:18
-
-
Save atomicscope/e72c8d8d934a2f81e4cff0c2f9f55f2c to your computer and use it in GitHub Desktop.
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
var client = new HttpClient() | |
client.BaseAddress = new Uri("https://api.coindesk.com/v1/bpi/currentprice.json"); | |
var result = await client.GetAsync(""); | |
var resultContent = await result.Content. ReadAsAsync<JObject>().Result; | |
var token = resultContent["bpi"]["USD"]["rate_float"]; | |
var price = (int)token; | |
if (price > 6000) { | |
log.Info(“Price is higher than the threshold value” + price); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment