示例#1
0
 public ActionResult Config()
 {
     try
     {
         var str = HttpRequestHelper.GetRequest(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, "config"), null);
         return(Content(str));
     }
     catch
     {
     }
     return(Content(""));
 }
示例#2
0
 public ActionResult Symbol_info(string group)
 {
     try
     {
         Dictionary <string, object> parms = new Dictionary <string, object>();
         parms.Add("group", group);
         var str = HttpRequestHelper.GetRequest(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, "symbol_info"), null);
         return(Content(str));
     }
     catch
     {
     }
     return(Content(""));
 }
示例#3
0
        /// <summary>
        /// 针对拜伦财经的接口推送
        /// </summary>
        /// <param name="marketId">市场中心的详情ID</param>
        /// <returns></returns>
        public ReturnModel GetChatIndexForBailun()
        {
            var rm = new ReturnModel();

            try
            {
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, apiQuoteSubscriber, "GetChatIndexForBailun"), null);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = "[{\"SubscriberId\":100009,\"MarketId\":1,\"Code\":\"EUR.USD\",\"Description\":\"European Monetary Union Euro\",\"Symbol\":\"EUR\",\"Currency\":\"USD\",\"ContractType\":\"CASH\",\"Exchange\":\"IDEALPRO\",\"Cn_Name\":\"欧元/美元\",\"En_Name\":\"EURUSD\",\"ConId\":\"100009\",\"DecimalPoint\":7,\"Ask\":\"1.11103\",\"Bid\":\"1.11099\",\"Pre_Close\":\"1.10830\",\"High\":\"1.11135\",\"Low\":\"1.10800\"},{\"SubscriberId\":100041,\"MarketId\":1,\"Code\":\"GBP.USD\",\"Description\":\"British pound\",\"Symbol\":\"GBP\",\"Currency\":\"USD\",\"ContractType\":\"CASH\",\"Exchange\":\"IDEALPRO\",\"Cn_Name\":\"英镑/美元\",\"En_Name\":\"GBPUSD\",\"ConId\":\"100041\",\"DecimalPoint\":7,\"Ask\":\"1.29195\",\"Bid\":\"1.29191\",\"Pre_Close\":\"1.29180\",\"High\":\"1.29265\",\"Low\":\"1.29115\"},{\"SubscriberId\":100058,\"MarketId\":1,\"Code\":\"USD.JPY\",\"Description\":\"United States dollar\",\"Symbol\":\"USD\",\"Currency\":\"JPY\",\"ContractType\":\"CASH\",\"Exchange\":\"IDEALPRO\",\"Cn_Name\":\"美元/日元\",\"En_Name\":\"USDJPY\",\"ConId\":\"100058\",\"DecimalPoint\":7,\"Ask\":\"112.478\",\"Bid\":\"112.474\",\"Pre_Close\":\"113.120\",\"High\":\"113.255\",\"Low\":\"112.425\"},{\"SubscriberId\":100061,\"MarketId\":1,\"Code\":\"AUD.USD\",\"Description\":\"Australian dollar\",\"Symbol\":\"AUD\",\"Currency\":\"USD\",\"ContractType\":\"CASH\",\"Exchange\":\"IDEALPRO\",\"Cn_Name\":\"澳元/美元\",\"En_Name\":\"AUDUSD\",\"ConId\":\"100061\",\"DecimalPoint\":7,\"Ask\":\"0.74148\",\"Bid\":\"0.74145\",\"Pre_Close\":\"0.74265\",\"High\":\"0.74320\",\"Low\":\"0.74110\"},{\"SubscriberId\":100029,\"MarketId\":1,\"Code\":\"USD.CAD\",\"Description\":\"United States dollar\",\"Symbol\":\"USD\",\"Currency\":\"CAD\",\"ContractType\":\"CASH\",\"Exchange\":\"IDEALPRO\",\"Cn_Name\":\"美元/加元\",\"En_Name\":\"USDCAD\",\"ConId\":\"100029\",\"DecimalPoint\":7,\"Ask\":\"1.36054\",\"Bid\":\"1.36050\",\"Pre_Close\":\"1.36070\",\"High\":\"1.36190\",\"Low\":\"1.36040\"},{\"SubscriberId\":100019,\"MarketId\":1,\"Code\":\"USD.CNH\",\"Description\":\"United States dollar\",\"Symbol\":\"USD\",\"Currency\":\"CNH\",\"ContractType\":\"CASH\",\"Exchange\":\"IDEALPRO\",\"Cn_Name\":\"美元/人民币\",\"En_Name\":\"USDCNH\",\"ConId\":\"100019\",\"DecimalPoint\":7,\"Ask\":\"6.87588\",\"Bid\":\"6.87587\",\"Pre_Close\":\"6.87550\",\"High\":\"6.87885\",\"Low\":\"6.87205\"},{\"SubscriberId\":100092,\"MarketId\":1,\"Code\":\"XAGUSD\",\"Description\":\"London Good Delivery\",\"Symbol\":\"XAGUSD\",\"Currency\":\"USD\",\"ContractType\":\"CMDTY\",\"Exchange\":\"SMART\",\"Cn_Name\":\"白银\",\"En_Name\":\"XAGUSD\",\"ConId\":\"100092\",\"DecimalPoint\":8,\"Ask\":\"16.90200\",\"Bid\":\"16.90000\",\"Pre_Close\":\"16.81000\",\"High\":\"16.94350\",\"Low\":\"16.82500\"},{\"SubscriberId\":100093,\"MarketId\":1,\"Code\":\"XAUUSD\",\"Description\":\"London Good Delivery\",\"Symbol\":\"XAUUSD\",\"Currency\":\"USD\",\"ContractType\":\"CMDTY\",\"Exchange\":\"SMART\",\"Cn_Name\":\"黄金\",\"En_Name\":\"XAUUSD\",\"ConId\":\"100093\",\"DecimalPoint\":8,\"Ask\":\"1243.850\",\"Bid\":\"1243.780\",\"Pre_Close\":\"1236.800\",\"High\":\"1245.120\",\"Low\":\"1236.600\"}]";
            }
            return(rm);
        }
示例#4
0
 public ActionResult Symbols(string symbol)
 {
     try
     {
         Dictionary <string, object> parms = new Dictionary <string, object>();
         parms.Add("symbol", HttpUtility.UrlEncode(symbol));
         var str = HttpRequestHelper.GetRequest(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, "symbols"), parms);
         return(Content(str));
     }
     catch
     {
     }
     return(Content(""));
 }
示例#5
0
        /// <summary>
        /// 获取首页各国经济数据
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public ReturnModel GetIndexGlobelIndicator()
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiWallsSummary), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#6
0
        /// <summary>
        /// 获取国家集合
        /// </summary>
        /// <returns></returns>
        public ReturnModel GetCountryBannerList()
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiNeedIndicatorList), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#7
0
        /// <summary>
        /// 获取国家对应的经济指标集合(不分大项)
        /// </summary>
        /// <param name="countryId"></param>
        /// <param name="addpar"></param>
        /// <returns></returns>
        public ReturnModel GetIndicaByCountryId(int countryId)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("countryId", countryId);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiIndicaByCountryId), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#8
0
        /// <summary>
        /// 根据ID获取经济指标详情数据
        /// </summary>
        /// <param name="mainItemId"></param>
        /// <returns></returns>
        public ReturnModel GetEcoItemDetails(string mainItemId)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("mainItemId", mainItemId);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiGetEcoItemDetails), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#9
0
        /// <summary>
        /// 获得品种详情信息
        /// </summary>
        /// <param name="plate"></param>
        /// <param name="pagesize"></param>
        /// <param name="pageindex"></param>
        /// <returns></returns>
        public ReturnModel GetQueryMarketDetail(int marketid)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("marketid", marketid);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, apiQueryQuote, "QueryMarketDetail"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#10
0
        /// <summary>
        ///  //获取金十数据详细介绍
        /// </summary>
        /// <returns></returns>
        public ReturnModel GetIntroduceInfo(int rctype, int rcountryId)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("rctype", rctype);
                parms.Add("rcountryId", rcountryId);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiReportList), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#11
0
        /// <summary>
        /// 获取首页各国经济数据ID
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public ReturnModel GetIndexGlobelIndicatorId(/*int pagesize = 1, int pageIndex = 100*/)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                //parms.Add("pagesize", pagesize);
                //parms.Add("pageIndex", pageIndex);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiIndicatorItems), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#12
0
 public ActionResult Timescale_marks(string symbol, string from, string to, string resolution)
 {
     try
     {
         Dictionary <string, object> parms = new Dictionary <string, object>();
         parms.Add("symbol", symbol);
         parms.Add("from", from);
         parms.Add("to", to);
         parms.Add("resolution", resolution);
         var str = HttpRequestHelper.GetRequest(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, "timescale_marks"), parms);
         return(Content(str));
     }
     catch
     {
     }
     return(Content(""));
 }
示例#13
0
 public ActionResult Search(string limit, string query, string type, string exchange)
 {
     try
     {
         Dictionary <string, object> parms = new Dictionary <string, object>();
         parms.Add("limit", limit);
         parms.Add("query", query);
         parms.Add("type", type);
         parms.Add("exchange", exchange);
         var str = HttpRequestHelper.GetRequest(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, "search"), parms);
         return(Content(str));
     }
     catch
     {
     }
     return(Content(""));
 }
示例#14
0
        /// <summary>
        /// 获取报名信息
        /// </summary>
        /// <param name="regType"></param>
        /// <param name="mobile"></param>
        /// <returns></returns>
        public ReturnModel GetRegisterByRegTypeMobileRm(int regType, string mobile)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("regType", regType);
                parms.Add("mobile", mobile);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMaster, apiRegisterInfo, "GetRegisterByRegTypeMobile"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#15
0
        /// <summary>
        /// 市场报价首页重要品种的产品ID列表信息获取
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public ReturnModel GetQueryRecommendProduct(int pageindex, int pagesize)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("pageindex", pageindex);
                parms.Add("pagesize", pagesize);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, apiQuoteQueryImportant, "Query_RecommendProduct"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#16
0
        public JsonResult CheckInvitationCode(string invitationCode)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("invitationCode", invitationCode);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMaster, "BailunBetaApi", "CheckInvitationCodeSendSms"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }

            return(Json(rm));
        }
示例#17
0
        /// <summary>
        /// 清除短信验证码
        /// </summary>
        /// <param name="sendType">发送类型</param>
        /// <param name="phone">手机号</param>
        /// <returns></returns>
        public ReturnModel ClearSmsVcode(short sendType, string phone)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("sendType", sendType);
                parms.Add("telephone", phone);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBaseService, apiSmsController, "ClearSMSRecord"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#18
0
        /// <summary>
        /// 获取指定时间之后财经快讯
        /// </summary>
        /// <param name="currentTime">13位时间戳</param>
        /// <returns></returns>
        public ReturnModel GetFinanceBriefByTime(long currentTime)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("currentTime", currentTime);

                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBailunNews, apiFinanceNews, "GetBriefByTimeBack"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#19
0
        /// <summary>
        /// 获取所有站点最新指定条数财经快讯
        /// </summary>
        /// <param name="topSize">单一网站获取条数</param>
        /// <returns></returns>
        public ReturnModel GetFinanceAllBrief(int topSize)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("topSize", topSize);

                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBailunNews, apiFinanceNews, "GetNewBriefByTopSize"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#20
0
        /// <summary>
        /// 获取分时数据
        /// </summary>
        /// <param name="marketid"></param>
        /// <returns></returns>
        public ReturnModel GetHistoryreconnect(string symbol, int resolution)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("symbol", symbol);
                parms.Add("resolution", resolution);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, "historyreconnect"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#21
0
        /// <summary>
        /// 根据产品获得该产品下面的品种板块有哪些(主要针对的是股票)
        /// </summary>
        /// <param name="plate"></param>
        /// <param name="pagesize"></param>
        /// <param name="pageindex"></param>
        /// <returns></returns>
        public ReturnModel GetQueryMarketByPlate(int plate, int pagesize, int pageindex)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("plate", plate);
                parms.Add("pagesize", pagesize);
                parms.Add("pageindex", pageindex);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, apiQuoteQueryPlate, "QueryMarketByPlate"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#22
0
        /// <summary>
        /// 获取首页各国经济数据chart
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public ReturnModel GetIndexGlobelIndicatorChart(int country, int type, int sp)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("country", country);
                parms.Add("type", type);
                parms.Add("sp", sp);
                rm = HttpRequestHelper.PostRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiKlineGraph), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#23
0
        /// <summary>
        /// 获取最新指定条数财经经济集合
        /// </summary>
        /// <param name="topSize">获取条数</param>
        /// <returns></returns>
        public ReturnModel GetFinanceEconomicsNew(int topSize, short website = 1)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("website", website);
                parms.Add("topSize", topSize);

                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBailunNews, apiFinanceCalendar, "GetCalendarByTopSize"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = "[{\"Id\":25670,\"SourceId\":\"231295\",\"UnscrambleId\":\"56\",\"DateName\":\"2017年至5月12日\",\"Title\":\"美国至5月12日当周API原油库存(万桶)\",\"Website\":1,\"Country\":\"美国\",\"CountryImg\":\"america.png\",\"Revised\":\"1\",\"Previous\":\"-578.9\",\"Consensus\":\"-228.3\",\"Actual\":\"88.2\",\"Level\":3,\"Star\":3,\"Impact\":4,\"AddDate\":1494950400000,\"ReleasedDate\":1494966786000,\"Status\":2},{\"Id\":25671,\"SourceId\":\"231296\",\"UnscrambleId\":\"57\",\"DateName\":\"2017年至5月12日\",\"Title\":\"美国至5月12日当周API汽油库存(万桶)\",\"Website\":1,\"Country\":\"美国\",\"CountryImg\":\"america.png\",\"Revised\":\"---\",\"Previous\":\"316.9\",\"Consensus\":\"-86.4\",\"Actual\":\"-178\",\"Level\":1,\"Star\":1,\"Impact\":3,\"AddDate\":1494950400000,\"ReleasedDate\":1494966833000,\"Status\":2},{\"Id\":25673,\"SourceId\":\"231298\",\"UnscrambleId\":\"1130\",\"DateName\":\"2017年至5月12日\",\"Title\":\"美国至5月12日当周API库欣原油库存(万桶)\",\"Website\":1,\"Country\":\"美国\",\"CountryImg\":\"america.png\",\"Revised\":\"---\",\"Previous\":\"-13.3\",\"Consensus\":\"-13.3\",\"Actual\":\"-53.9\",\"Level\":1,\"Star\":2,\"Impact\":3,\"AddDate\":1494950400000,\"ReleasedDate\":1494966845000,\"Status\":2},{\"Id\":25672,\"SourceId\":\"231297\",\"UnscrambleId\":\"58\",\"DateName\":\"2017年至5月12日\",\"Title\":\"美国至5月12日当周API精炼油库存(万桶)\",\"Website\":1,\"Country\":\"美国\",\"CountryImg\":\"america.png\",\"Revised\":\"---\",\"Previous\":\"-117.4\",\"Consensus\":\"-125\",\"Actual\":\"178.7\",\"Level\":1,\"Star\":1,\"Impact\":4,\"AddDate\":1494950400000,\"ReleasedDate\":1494966858000,\"Status\":2}]";
            }
            return(rm);
        }
示例#24
0
        /// <summary>
        /// 根据产品获得该产品下面的品种板块有哪些(主要针对的是股票)
        /// </summary>
        /// <param name="product"></param>
        /// <param name="pagesize"></param>
        /// <param name="pageindex"></param>
        ///  <param name="ClassificationType"></param>
        /// <returns></returns>
        public ReturnModel GetQueryPlatInfoByProduct(int product, int pagesize, int pageindex, int ClassificationType)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("product", product);
                parms.Add("pagesize", pagesize);
                parms.Add("pageindex", pageindex);
                parms.Add("ClassificationType", ClassificationType);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, apiQuoteQueryPlate, "QueryPlatInfoByProduct"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#25
0
        /// <summary>
        /// 发送手机短信验证码
        /// </summary>
        /// <param name="clientType">客户端(汇信 = 1,外汇110 = 2,论坛 = 3)</param>
        /// <param name="sendType">发送类型:注册 = 1,修改密码 = 2,更换手机号码 = 3,更换邮箱 = 4,绑定邮箱 = 5,绑定手机 = 6,验证短信 = 7,拜仑财经邀请码 = 9,拜仑财经验证码 = 10,拜仑财经邀请 = 11</param>
        /// <param name="phone"></param>
        /// <returns></returns>
        public ReturnModel SendSmsVcode(short clientType, short sendType, string phone)
        {
            var rm = new ReturnModel();

            try
            {
                //api/sms/sendCode
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("clientType", clientType);
                parms.Add("sendType", sendType);
                parms.Add("telephone", phone);
                rm = HttpRequestHelper.PostRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBaseService, apiSmsController, "sendCode"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#26
0
        /// <summary>
        /// 获取国家比较图表数据
        /// </summary>
        /// <returns></returns>
        public ReturnModel GetCountryCompareChart(string mcountry, int itemId, string uptxttime, string downtxttime)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("mcountry", mcountry);
                parms.Add("itemId", itemId);
                parms.Add("uptxttime", uptxttime);
                parms.Add("downtxttime", downtxttime);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiThanMulitple), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#27
0
        /// <summary>
        /// 获取(当前传入时间节点)最新指定条数财经快讯
        /// </summary>
        /// <param name="website">来源网站(枚举:(1:金十;2:华尔街;3:fx168;4:fx678;5:DailyFx;))</param>
        /// <param name="isAfter">是否加载当前时间之后的true表示加载,false表示加载当前之间节点之前的</param>
        /// <param name="currentTime">当前日期(13位时间戳)</param>
        /// <param name="topSize">返回记录数</param>
        /// <returns></returns>
        public ReturnModel GetFinanceBrief(short website, bool isAfter, long currentTime, int topSize)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("comeWebsite", website);
                parms.Add("isAfter", isAfter);
                parms.Add("currentTime", currentTime);
                parms.Add("topSize", topSize);

                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBailunNews, apiFinanceNews, "GetNewBriefByTime"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#28
0
        /// <summary>
        /// 首页头部banner数据
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="ctype"></param>
        /// <param name="countryId"></param>
        /// /// <param name="valueTime"></param>
        /// <returns></returns>
        public ReturnModel GetIndexBannerData(int pageSize, int pageIndex, int ctype, int countryId, int valueTime)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("pageSize", pageSize);
                parms.Add("pageIndex", pageIndex);
                parms.Add("ctype", ctype);
                parms.Add("countryId", countryId);
                parms.Add("valueTime", valueTime);
                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiMacroeData, apiJinTenBlank), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#29
0
        /// <summary>
        /// 查询外汇历史报价数据
        /// </summary>
        /// <param name="marketdetailsid"></param>
        /// <param name="datetime">格式:20170101 10:10:10</param>
        /// <param name="leftOrRight">0/1 默认查找历史</param>
        /// <param name="historytype">历史类型</param>
        /// <returns></returns>
        public ReturnModel GetQuoteHistory(int marketdetailsid, string datetime, int leftOrRight, int historytype)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("marketdetailsid", marketdetailsid);
                parms.Add("datetime", datetime);
                parms.Add("leftOrRight", leftOrRight);
                parms.Add("historytype", historytype);

                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiQuote, apiQuoteHistory, "GetForexHistory"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }
示例#30
0
        /// <summary>
        /// 获取指定ID财经经济统计信息
        /// </summary>
        /// <param name="website">网站类别</param>
        /// <param name="unscrambleId">解读ID</param>
        /// <returns></returns>
        public ReturnModel GetEconomicsChart(short website, long startDate, long endDate, string unscrambleId)
        {
            var rm = new ReturnModel();

            try
            {
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("website", website);
                parms.Add("startDate", startDate);
                parms.Add("endDate", endDate);
                parms.Add("unscrambleId", unscrambleId);

                rm = HttpRequestHelper.GetRequest <ReturnModel>(HttpApiHelper.CreateHttpApiCall(CustomConfig.ApiBailunNews, apiFinanceCalendar, "GetEconomicsById"), parms);
            }
            catch (Exception ex)
            {
                rm.bodyMessage = ex.Message;
            }
            return(rm);
        }