Пример #1
0
        public int GetTolerance(string pair)
        {
            if (!ProductSettings.ContainsKey(pair))
            {
                return(-1);
            }
            string data = ProductSettings[pair].Tolerance;

            if (System.String.IsNullOrEmpty(data))
            {
                return(-1);
            }

            return(int.Parse(data));
        }
Пример #2
0
        public int GetDecimals(string pair)
        {
            if (!ProductSettings.ContainsKey(pair))
            {
                return(-1);
            }
            string data = ProductSettings[pair].DecimalPlaces;

            //if (pair == "JPX/JPY" || pair == "UDX/USD") data = "3"; //correct JPX mistake

            if (System.String.IsNullOrEmpty(data))
            {
                return(-1);
            }

            return(int.Parse(data));
        }