private static DataHistory ParseJson(string jsonRaw)
        {
            var histoResponse = DataHistoryResponse.FromJson(jsonRaw);

            if (histoResponse.Response != "Success")
            {
                throw new Exception("Couldn't create the data hist");
            }

            var candles = histoResponse.Data;

            return(new DataHistory(candles));
        }
Esempio n. 2
0
 public static string ToJson(this DataHistoryResponse self) =>
 JsonConvert.SerializeObject(self, Converter.Settings);