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)); }
public static string ToJson(this DataHistoryResponse self) => JsonConvert.SerializeObject(self, Converter.Settings);