Bitcoin Forum
May 22, 2024, 05:34:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Adding BTC value in vb.net windows form applications  (Read 121 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: 3682
Merit: 6406


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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
TryNinja
Legendary
*
Offline Offline

Activity: 2842
Merit: 7040


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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!