Bitcoin Forum
November 04, 2024, 06:55:52 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: get Bitcoin price using asp.net  (Read 1544 times)
kieran5405 (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
May 14, 2013, 02:44:08 PM
 #1


Hi,

Does anyone know how to get the buying and selling bitcoin price using .NET from the mt gox or similar site . 

I have looked at the API sites and nothing seems to be aimed at .NET.

Thanks for any pointers and help...
n8rwJeTt8TrrLKPa55eU
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 14, 2013, 03:52:47 PM
 #2

First, use System.Net.WebClient to retrieve the content from

http://data.mtgox.com/api/2/BTCUSD/money/ticker

Then, depending on how complex you wanna get, either just parse the result via Regex.Match to extract the "last" trade value, or alternatively the built-in DataContractJsonSerializer to map to a .NET class, or the built-in JsonReaderWriterFactory.CreateJsonReader will create XML from JSON, or find some free add-on libraries that will parse JSON (e.g. http://json.codeplex.com/).
kieran5405 (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
May 15, 2013, 09:25:28 AM
 #3


cheers for that...got it working with ur help...
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!