示例#1
0
        public QuantTraderConfig()
        {
            //CTPBroker defaultBroker = new CTPBroker(){ID = "4700",Name = "东海期货"};
            //defaultBroker.QuoteServers = new List<string>(){"tcp://ctpdx1.dh168.com.cn:41213"};
            //defaultBroker.TradeServers = new List<string>(){"tcp://ctpdx1.dh168.com.cn:41205"};

            CTPBroker defaultBroker = new CTPBroker()
            {
                ID = "9999", Name = "SimNow"
            };

            defaultBroker.QuoteServers = new List <string>()
            {
                "tcp://180.168.146.187:10010"
            };
            defaultBroker.TradeServers = new List <string>()
            {
                "tcp://180.168.146.187:10000"
            };

            Brokers = new List <CTPBroker>()
            {
                defaultBroker
            };

            SubscribeMarketDatas = new List <string>();

            //SubscribeMarketDatas.Add("cu1705");
            //SubscribeMarketDatas.Add("ni1705");
            //SubscribeMarketDatas.Add("ru1705");
            //SubscribeMarketDatas.Add("ag1706");
            //SubscribeMarketDatas.Add("rb1705");
            //SubscribeMarketDatas.Add("i1705");
            //SubscribeMarketDatas.Add("j1705");
            //SubscribeMarketDatas.Add("jm1705");
            //SubscribeMarketDatas.Add("p1705");
            //SubscribeMarketDatas.Add("m1705");
            //SubscribeMarketDatas.Add("cf705");

            // 数据默认路径
            DataPath = new DataPathConfig();

            AccountInfo = new CTPAccountInfo();
        }
示例#2
0
 public CTPDataReceiver(CTPAccountInfo accountInfo)
 {
     _accountInfo = accountInfo;
 }