/// <summary> /// Gets the ticker for a given currency pair /// </summary> /// <param name="pair">The currency pair</param> /// <returns>The ticker</returns> public CallResult <DE.Ticker> GetTicker(CurrencyPair pair) { return(CallProxy(() => BtceApi.GetTicker(pair.ToBtcePair()), t => new DE.Ticker { Ask = t.Buy,//Buy/Sell are opposite in btc-e Bid = t.Sell, High = t.High, Low = t.Low, Last = t.Last })); }
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); }
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); }
public override bool GetTicker() { try { var ticker = BtceApi.GetTicker(currentPair); // buy e sell vanno bene per gli ordini perchè buy > sell this.Sell = ticker.Sell; this.Buy = ticker.Buy; this.Date = CUtility.UnixTime.ConvertToDateTime(ticker.ServerTime); this.Volume = (decimal)ticker.VolumeCurrent; //decimal.Parse(ticker.Volume); OnTicker(); return(true); } catch (Exception) { throw; } }
public Task <Ticker> GetTickerAsync(BtcePair pair) { return(Task.Run(() => BtceApi.GetTicker(pair))); }