/// <summary> /// Gets the order book for a given currency pair /// </summary> /// <param name="currencyPair"></param> /// <returns></returns> public CallResult <OrderBook> GetFullOrderBook(CurrencyPair currencyPair) { return(MakePostRequest <OrderBook>("marketorders", result => OrderBook.CreateFromJObject(result as JObject, false), new Dictionary <string, string> { { "marketid", currencyPair.ID } })); }
/// <summary> /// Places a trade order /// </summary> /// <param name="price">The order's price</param> /// <param name="amount">The amount</param> /// <param name="orderType">The type of order (Buy/Sell)</param> /// <param name="pair">The currency pair</param> /// <returns></returns> public CallResult <long> PlaceOrder(decimal price, decimal amount, string orderType, CurrencyPair pair) { return(MakePostRequest("createorder", result => 10L, new Dictionary <string, string> { { "price", price.ToString(CultureInfo.InvariantCulture) }, { "quantity", amount.ToString(CultureInfo.InvariantCulture) }, { "marketid", pair.ID }, { "ordertype", orderType } })); }
/// <summary> /// Gets the order book for a given currency pair /// </summary> /// <param name="currencyPair"></param> /// <returns></returns> public CallResult <OrderBook> GetOrderBook(CurrencyPair currencyPair) { return(MakeGetRequest <OrderBook>("?method=singleorderdata&marketid=" + currencyPair.ID, result => OrderBook.CreateFromJObject(result[currencyPair.Item1] as JObject, true))); }