public ActionResult CurrencyDetail(int symbol) { var response = MCAPI.Get <JObject>("ticker/" + symbol); var tickers = MCAPI.GetSysmbolData(response); if (symbol == 1) { var response_trade = Bitfinex.GetTicklers("candles/trade:1M:tBTCUSD/hist"); JsonSerializerSettings _jsonSetting = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }; ViewBag.DataPoints = JsonConvert.SerializeObject(response_trade.ListChartParameters.ToList(), _jsonSetting); tickers.ListChartParameters = response_trade.ListChartParameters; } else if (symbol == 1027) { var response_trade = Bitfinex.GetTicklers("candles/trade:1M:tETHUSD/hist"); JsonSerializerSettings _jsonSetting = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }; ViewBag.DataPoints = JsonConvert.SerializeObject(response_trade.ListChartParameters.ToList(), _jsonSetting); tickers.ListChartParameters = response_trade.ListChartParameters; } return(View(tickers)); }
public ActionResult _ChartTable(int sym, string selectedval) { var response = MCAPI.Get <JObject>("ticker/" + 1); var symbol = ""; var tickers = MCAPI.GetSysmbolData(response); var response_trade = new Ticklers(); if (sym == 1) { symbol = "tBTCUSD"; } else if (sym == 2) { symbol = "tETHUSD"; } if (selectedval == "1Min") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "m:" + symbol + "/hist"); } else if (selectedval == "1Hour") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "h:" + symbol + "/hist"); } else if (selectedval == "1Day") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "D:" + symbol + "/hist"); } else if (selectedval == "7Days") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 7 + "D:" + symbol + "/hist"); } else if (selectedval == "14Days") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 14 + "D:" + symbol + "/hist"); } else if (selectedval == "1Month") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "M:" + symbol + "/hist"); } JsonSerializerSettings _jsonSetting = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }; ViewBag.DataPoints = JsonConvert.SerializeObject(response_trade.ListChartParameters.ToList(), _jsonSetting); return(PartialView(tickers)); }
public ActionResult _HistoricalTable(string drpdownval, int sym = 1) { var response = MCAPI.Get <JObject>("ticker/" + 1); var symbol = ""; var tickers = MCAPI.GetSysmbolData(response); var response_trade = new Ticklers(); if (sym == 1) { symbol = "tBTCUSD"; } else if (sym == 2) { symbol = "tETHUSD"; } if (drpdownval == "1 Min") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "m:" + symbol + "/hist"); } else if (drpdownval == "1 Hour") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "h:" + symbol + "/hist"); } else if (drpdownval == "30 Days") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "M:" + symbol + "/hist"); } else if (drpdownval == "7 Days") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 7 + "D:" + symbol + "/hist"); } else if (drpdownval == "1 Day") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 1 + "D:" + symbol + "/hist"); } else if (drpdownval == "14 Days") { response_trade = Bitfinex.GetTicklers("candles/trade:" + 14 + "D:" + symbol + "/hist"); } tickers.ListChartParameters = response_trade.ListChartParameters; return(PartialView(tickers)); }