public static string ToString(this CandleResolution resolution)
        {
            string res   = resolution.ToString();
            char   first = res[0];

            return(res.Substring(1) + first);
        }
예제 #2
0
        public override JObject GetKLine(SecurityInfo si, CandleResolution resolution, string from, string to)
        {
            string res = Query("GET", string.Format("/market/candles/{0}/{1}", resolution.ToString(), si.Code), null, false);

            try
            {
                JObject jo = (JObject)JsonConvert.DeserializeObject(res);
                if (jo["status"].ToString() == "0")
                {
                    return(jo);
                }
                return(null);
            }
            catch
            {
                return(null);
            }
        }