Author

Topic: Adding BTC value in vb.net windows form applications (Read 143 times)

legendary
Activity: 2758
Merit: 6830
A simple example:

1. Install Json.net with NuGet: https://www.newtonsoft.com/json;

2. Import it;
Code:
Imports Newtonsoft.Json.Linq

3. Use something like this:
Code:
Dim webClient As New System.Net.WebClient
Dim result As String = webClient.DownloadString("https://api.coinmarketcap.com/v2/ticker/1/?convert=BTC")

Dim json As JObject = JObject.Parse(result)
TextBox1.Text = "$" + json.SelectToken("data").SelectToken("quotes").SelectToken("USD").SelectToken("price").ToString()
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
Hello guys, Is it possible to show the BTC value in a button or textbox in vb.net windows form application? I need it so bad.
Thanks


You have to make a http request to one of the exchanges, for example https://api.bitfinex.com/v1/pubticker/BTCUSD
Then you have to parse the response (json) and get the price (docs are here https://bitfinex.readme.io/v1/reference#rest-public-ticker)
Then you can set the text on the button.

Of course, you may have to refresh that value from time to time.
newbie
Activity: 5
Merit: 0
Hello guys, Is it possible to show the BTC value in a button or textbox in vb.net windows form application? I need it so bad.
Thanks
Jump to: