static void Main(string[] args) { var ticker = BtceApi.GetTicker(BtcePair.BtcUsd); var trades = BtceApi.GetTrades(BtcePair.BtcUsd); var btcusdDepth = BtceApi.GetDepth(BtcePair.UsdRur); var fee = BtceApi.GetFee(BtcePair.UsdRur); var btceApi = new BtceApi("YOUR-API-KEY", "your_secret_key"); var info = btceApi.GetInfo(); var transHistory = btceApi.GetTransHistory(); var tradeHistory = btceApi.GetTradeHistory(count: 20); var orderList = btceApi.GetOrderList(); var tradeAnswer = btceApi.Trade(BtcePair.BtcUsd, TradeType.Sell, 20, 0.1m); var cancelAnswer = btceApi.CancelOrder(tradeAnswer.OrderId); }
static void Main(string[] args) { var ticker = BtceApi.GetTicker(BtcePair.btc_usd); var trades = BtceApi.GetTrades(BtcePair.btc_usd); var btcusdDepth = BtceApi.GetDepth(BtcePair.usd_rur); var fee = BtceApi.GetFee(BtcePair.usd_rur); var btceApi = new BtceApi("API_KEY", "API_SECRET"); var info = btceApi.GetInfo(); var transHistory = btceApi.GetTransHistory(); var tradeHistory = btceApi.GetTradeHistory(count: 20); var orderList = btceApi.GetOrderList(); var tradeAnswer = btceApi.Trade(BtcePair.btc_usd, TradeType.Sell, 20, 0.1m); var cancelAnswer = btceApi.CancelOrder(tradeAnswer.OrderId); }
/// <summary> /// Gets the order book for a currency pair /// </summary> /// <param name="pair">The currency pair</param> /// <returns>The order book (bids/asks)</returns> public CallResult <OrderBook> GetOrderBook(CurrencyPair pair) { return(CallProxy(() => BtceApi.GetDepth(pair.ToBtcePair()), orderBook => new OrderBook { Asks = orderBook.Asks.Select(a => new DE.SimpleOrderInfo { Amount = a.Amount, Price = a.Price }).ToList(), Bids = orderBook.Bids.Select(b => new DE.SimpleOrderInfo { Amount = b.Amount, Price = b.Price }).ToList() }));; }