Пример #1
0
        private void btnHundsun_Click(object sender, EventArgs e)
        {
            AEntrust engine = AEntrust.GetInstance(EntrustVendor.Hundsun);

            engine.Logon();
            textBoxCheckHundsun.Text = engine.GetToken();
        }
Пример #2
0
        public AOptionMakeMarket()
        {
            instanceid++;

            //行情引擎
            MarketVendor mvendor = (MarketVendor)Config.GetInstance().GetParameter(Config.C_MARKETENGINE_OPTION);

            _optionengine = AMarket.GetInstance(mvendor);
            //委托引擎
            EntrustVendor evendor = (EntrustVendor)Config.GetInstance().GetParameter(Config.C_ENTRUSTENGINE_OPTION);

            _entrustengine = AEntrust.GetInstance(evendor);
            _entrustengine.Logon();

            //参数
            c_min_entrust_volume = (int)Config.GetInstance().GetParameter(Config.C_PARA_MM_MIN_ENTRUST_VOLUME);

            _queryparam           = new QueryPara();
            _queryparam.fundcode  = Config.GetInstance().GetParameter(Config.C_PARA_MM_FUNDCODE).ToString();
            _queryparam.portfolio = Config.GetInstance().GetParameter(Config.C_PARA_MM_PORTFOLIO).ToString();
        }
Пример #3
0
        static void testMM1()
        {
            string acc   = "1104";
            string combi = "11040201";

            List <ASecurity> underlyinglist = new List <ASecurity>();

            //underlyinglist.Add(new ETF("510050", Exchange.SHE));
            underlyinglist.Add(new ETF("510180", Exchange.SHE));
            underlyinglist.Add(new Stock("601318", Exchange.SHE));
            //underlyinglist.Add(new Stock("600104", Exchange.SHE));

            AMarket       mkt        = AMarket.GetInstance(MarketVendor.Exchange);
            List <Option> optionlist = mkt.GetOptionSet(underlyinglist);

            foreach (Option o in optionlist)
            {
                QueryPara param = new QueryPara();
                param.fundcode     = acc;
                param.portfolio    = combi;
                param.securitycode = o.code;

                AEntrust et = AEntrust.GetInstance(EntrustVendor.Hundsun);
                et.OptionEntrustQuery(param, o.entrustbook);
                bool flg = o.makemarketstat.IsValid();

                if (o.entrustbook != null && o.entrustbook.Count > 0)
                {
                    foreach (EntrustBook eb in o.entrustbook)
                    {
                        eb.DebugPrint();
                    }
                }

                //Debug.Print(string.Format("spread, code={2},name={3},价差={0},{1}", o.makemarketstat.currminspreadpct.ToString("P2"), o.makemarketstat.message, o.code,o.name));
            }
        }