EasyMTGox - simple .NET API-wrapper to MTGox
With EasyMTGox you can access MTGox from inside you own .NET Application!
In the Download is a Sampleapplication that shows nearly everything that can be done! (trader.exe)
Its as easy as a Hello World:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EasyMTGoxNS;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(”Lastprice:” + EasyMTGox.GetTickerData().LastPrice.ToString()+”USD/BTC”);
Console.WriteLine(”Input your username”);
string Username = Console.ReadLine();
Console.WriteLine(”Input your Password:”);
string Password = Console.ReadLine();
EasyMTGox EMTGOX = new EasyMTGox(Username, Password);
if (EMTGOX.IsConnectionFine())
{
Balance Balance = EMTGOX.GetBalance();
Console.WriteLine(”You have ” + Balance.BTC + “BTC” + ” and ” + Balance.USD + “USD”);
Console.WriteLine(”How many BTC do you want to buy?”);
string amount = Console.ReadLine();
Console.WriteLine(”Maximum price you want to pay per BTC in USD?”);
string price = Console.ReadLine();
EMTGOX.BuyBTCOrder(amount, price);
}
else
{
Console.WriteLine(”Something went wrong! Check Username Password and Internetconnection!”);
}
Console.ReadLine();
}
}
}