Пример #1
0
 /// <summary>
 /// Gets the fee associated to a currency pair
 /// </summary>
 /// <param name="pair">The currency pair</param>
 /// <returns>The fee</returns>
 public CallResult <Fee> GetFee(CurrencyPair pair)
 {
     return(CallProxy(() => BtceApi.GetFee(pair.ToBtcePair()), f =>
                      new Fee
     {
         BuyFee = f,
         SellFee = f
     }));
 }
        public override void Init()
        {
            _btceApi = new BtceApi(Api, Secret);

            this.Currency       = "USD";
            this.CryptoCurrency = "BTC";
            this.Name           = "Btce";
            InitCandles(this, _candleSource);

            this.Fee = BtceApi.GetFee(currentPair) / 100M;
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }