HTTPS SSH

CCXSharp

A C# Client that connects to MtGox's REST API's

Add this project to an existing project to use the MtGoxConnection class to invoke the various web services that MtGox provides This library is currently built for the latest MtGOX V2 API's. Their documentation is still being built, so this project will slowly adapt to accommodate their changes.

Project Dependencies:
 * RestSharp [NuGet Package]
 * JSON.NET [NuGet Package]
 * SocketIO4Net.Client [NuGet Package]
 * MEFedMVVM [NuGet Package]
 * Cinch [NuGet Package]

Here is an example on how to use this library:

using System.Collections.Generic;
using CCXSharp.Interfaces;
using CCXSharp.MtGox;
using CCXSharp.MtGox.Models;

namespace CCXSHarpDemo
{
    public static class Example1
    {
        public static bool CreateOrder()
        {
            IExchangeConnection exchangeConnection = new MtGoxConnection();
            AccountInfo info = exchangeConnection.GetAccountInfo();  // your account information.
            string IdKey = exchangeConnection.GetIdKey();
            Ticker ticker = exchangeConnection.GetTicker(Currency.USD); // current ticker
            Depth depth = exchangeConnection.GetDepth(Currency.USD); // get the current depth
            List<Order> orders = exchangeConnection.GetOrders();  // get all open orders
            OrderCreateResponse response = exchangeConnection.CreateOrder(Currency.USD, OrderType.Ask, 150.0, 10.0);
            OrderCancelResponse cancelResponse = exchangeConnection.CancelOrder(response.OID);

            return cancelResponse.Result.Contains("success");
        }
    }
}

You must add this to your web/app config file (in the startup application, not the CCXSharp project) in order to use this library. You can obtain your API key in the Security Center tab at MtGox and assign it some access rights.

<appSettings>
    <add key = "MtGoxAPIKey" value="key" />
    <add key = "MtGoxAPISecret" value="secret"/>
</appSettings>

A couple of us are working on this client/library in our spare time.. although we do not get paid for these efforts, any donations to the cause are greatly appreciated! 19Z7esDYUf7Na4MSM1ps9pUDkNmvBNDLL3

Thanks!