static void Main(string[] args) { //configure date here DateTime test = DateTime.Now - new TimeSpan(24, 0, 0); //minues 1 day (24h) int epoch = TimeConvertion.FromDateToEpochsEST(test); //Configure other items here: string coin = "BTC"; string baseCurrency = "USD"; string numberOfCallsLimit = "1";//max of 2,000 List <CoinHourlyInfo> transactions = runAPIcall_OrganizeResponse(coin, baseCurrency, numberOfCallsLimit, epoch.ToString()).ToList(); }
private static ICollection <CoinHourlyInfo> organizeJson(string aData) { JArray jay = JArray.Parse(aData); IList <CoinHourlyInfo> transactions = jay.Select(p => new CoinHourlyInfo { TimeFrom = TimeConvertion.FromEpochsToDateTime((int)p["time"]), open = (float)p["open"], close = (float)p["close"], high = (float)p["high"], low = (float)p["low"], volumefrom = (float)p["volumefrom"], volumeto = (float)p["volumeto"] }).ToList(); return(transactions); }