public Configuration() { publicKey = ConfigurationManager.AppSettings["btcePublicKey"]; secretKey = ConfigurationManager.AppSettings["btceSecretKey"]; pairs = new List <BtcePairEnum>(); PairAggregatorIncrement = new Dictionary <BtcePairEnum, decimal>(); var pairsStrings = ConfigurationManager.AppSettings["Pairs"].Split(new[] { ',' }); foreach (var pairsString in pairsStrings) { pairs.Add(BtcePairHelper.FromString(pairsString)); } PairAggregatorIncrement.Add(BtcePairEnum.btc_usd, 1); PairAggregatorIncrement.Add(BtcePairEnum.ltc_usd, 0.1m); PairAggregatorIncrement.Add(BtcePairEnum.nmc_usd, 0.1m); PairAggregatorIncrement.Add(BtcePairEnum.ltc_btc, 0.0001m); }
/// <summary> /// Converts a CurrenyPair instance to a BtcePair /// </summary> /// <param name="pair"></param> /// <returns></returns> public static BtcePair ToBtcePair(this CurrencyPair pair) { return(BtcePairHelper.FromString(string.Format("{0}_{1}", pair.Item1, pair.Item2))); }