Bitcoin Forum
July 08, 2025, 11:06:21 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Adding BTC value in vb.net windows form applications  (Read 146 times)
Karim12 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
May 28, 2018, 01:59:40 AM
 #1

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
NeuroticFish
Legendary
*
Offline Offline

Activity: 4088
Merit: 6889


Looking for campaign manager? Contact icopress!


View Profile
May 28, 2018, 05:33:08 AM
 #2

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.

███████████▄
████████▄▄██
█████████▀█
███████████▄███████▄
█████▄█▄██████████████
████▄█▀▄░█████▄████████
████▄███░████████████▀
████░█████░█████▀▄▄▄▄▄
█████░█
██░█████████▀▀
░▄█▀
███░░▀▀▀██████
▀███████▄█▀▀▀██████▀
░░████▄▀░▀▀▀▀████▀
 

█████████████████████████
████████████▀░░░▀▀▀▀█████
█████████▀▀▀█▄░░░░░░░████
████▀▀░░░░░░░█▄░▄░░░▐████
████▌░░░░▄░░░▐████░░▐███
█████░░░▄██▄░░██▀░░░█████
█████▌░░▀██▀░░▐▌░░░▐█████
██████░░░░▀░░░░█░░░▐█████
██████▌░░░░░░░░▐█▄▄██████
███████▄░░▄▄▄████████████
█████████████████████████

█████████████████████████
████████▀▀░░░░░▀▀████████
██████░░▄██▄░▄██▄░░██████
█████░░████▀░▀████░░█████
████░░░░▀▀░░░░░▀▀░░░░████
████░░▄██░░░░░░░██▄░░████
████░░████░░░░░████░░████
█████░░▀▀░▄███▄░▀▀░░████
██████░░░░▀███▀░░░░██████
████████▄▄░░░░░▄▄████████
█████████████████████████
.
...SOL.....USDT...
...FAST PAYOUTS...
...BTC...
...TON...
TryNinja
Legendary
*
Offline Offline

Activity: 3248
Merit: 8468


♻️ Automatic Exchange


View Profile WWW
May 28, 2018, 03:57:47 PM
 #3

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()

░░░░▄▄████████████▄
▄████████████████▀
▄████████████████▀▄█▄
▄██████▀▀░░▄███▀▄████▄
▄██████▀░░░▄███▀▀██████▄
██████▀░░▄████▄░░░▀██████
██████░░▀▀▀▀▄▄▄▄░░██████
██████▄░░░▀████▀░░▄██████
▀██████▄▄███▀░░░▄██████▀
▀████▀▄████░░▄▄███████▀
▀█▀▄████████████████▀
▄████████████████▀
▀████████████▀▀░░░░
 
 CCECASH 
 
    ANN THREAD    
 
      TUTORIAL      
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!