Пример #1
0
 /// <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 }
     }));
 }
Пример #2
0
 /// <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 }
     }));
 }
Пример #3
0
 /// <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)));
 }