예제 #1
0
 public TrdGetOrderFillListExec(TrdEnv trdenv, long accID, TrdMarket trdMarket, TrdFilterConditions filterConditions, IUpdateCallBack callback)
 {
     this.trdenv           = trdenv;
     this.accID            = accID;
     this.trdMarket        = trdMarket;
     this.filterConditions = filterConditions;
     this.callback         = callback;
 }
예제 #2
0
 public QotGetOrderBookExec(QotMarket market, String symbol, int num, IUpdateCallBack callback)
 {
     this.market = market;
     this.symbol = symbol;
     this.num    = num;
     if (this.num > 10)
     {
         this.num = 10;
     }
     this.callback = callback;
 }
 public QotGetTickerExec(QotMarket market, String symbol, int maxRetNum, IUpdateCallBack callback)
 {
     this.market    = market;
     this.symbol    = symbol;
     this.maxRetNum = maxRetNum;
     if (maxRetNum > 1000)
     {
         this.maxRetNum = 1000;
     }
     this.callback = callback;
 }
 public QotGetKLExec(QotMarket market, String symbol, RehabType rehabType, KLType klType, int reqNum, IUpdateCallBack callback)
 {
     this.market    = market;
     this.symbol    = symbol;
     this.rehabType = rehabType;
     this.klType    = klType;
     this.reqNum    = reqNum;
     if (this.reqNum > 1000)
     {
         this.reqNum = 1000;
     }
     this.callback = callback;
 }
 public QotGetRTExec(QotMarket market, String symbol, IUpdateCallBack callback)
 {
     this.market   = market;
     this.symbol   = symbol;
     this.callback = callback;
 }
        public Qot_GetTicker.Response qotGetTicker(QotMarket market, String symbol, int maxRetNum, IUpdateCallBack callback)
        {
            QotGetTickerExec exec = new QotGetTickerExec(market, symbol, maxRetNum, callback);

            request.execute(exec);
            return((Qot_GetTicker.Response)exec.getValue());
        }
        //	public QotGetKL.Response qotGetKL(QotMarket market, String symbol, RehabType rehabType, KLType klType, int reqNum, IUpdateCallBack<List<KLine>> callback)
        //{
        //    QotGetKLExec exec = new QotGetKLExec(market, symbol, rehabType, klType, reqNum, callback);
        //request.execute(exec);
        //		return exec.getValue();
        //	}

        //	public QotGetRT.Response qotGetRT(QotMarket market, String symbol, IUpdateCallBack<List<TimeShare>> callback)
        //{
        //    QotGetRTExec exec = new QotGetRTExec(market, symbol, callback);
        //request.execute(exec);
        //		return exec.getValue();
        //	}


        public Qot_GetTicker.Response qotGetTicker(QotMarket market, String symbol, IUpdateCallBack callback)
        {
            return(qotGetTicker(market, symbol, 100, callback));
        }
        public Qot_GetBasicQot.Response stockBasicInfo(QotMarket market, String[] symbol, IUpdateCallBack callback)
        {
            QotGetBasicQotExec exec = new QotGetBasicQotExec(market, symbol, callback);

            request.execute(exec);
            return((Qot_GetBasicQot.Response)exec.getValue());
        }
        public Trd_GetOrderFillList.Response trdGetOrderFillList(TrdMarket trdMarket, TrdFilterConditions filterConditions, IUpdateCallBack callback)
        {
            long accID = getAccId(trdenv, trdMarket);
            TrdGetOrderFillListExec exec = new TrdGetOrderFillListExec(trdenv, accID, trdMarket, filterConditions, callback);

            request.execute(exec);
            return((Trd_GetOrderFillList.Response)exec.getValue());
        }
        public Trd_PlaceOrder.Response trdPlaceOrder(TrdMarket trdMarket, TrdSide trdSide, OrderType orderType, String code, double qty, double price, Boolean adjustPrice, Double adjustSideAndLimit, IUpdateCallBack callback)
        {
            long accID             = getAccId(trdenv, trdMarket);
            TrdPlaceOrderExec exec = new TrdPlaceOrderExec(trdenv, accID, trdMarket, trdSide, orderType, code, qty, price, adjustPrice, adjustSideAndLimit, request.getConnID(), callback);

            request.execute(exec);
            return((Trd_PlaceOrder.Response)exec.getValue());
        }
 public QotGetBasicQotExec(QotMarket market, String[] symbols, IUpdateCallBack callback)
 {
     this.market   = market;
     this.symbols  = symbols;
     this.callback = callback;
 }
 public TrdPlaceOrderExec(TrdEnv trdenv, long accID, TrdMarket trdMarket, TrdSide trdSide, OrderType orderType, String code, double qty, double price, Object adjustPrice, Object adjustSideAndLimit, long connID, IUpdateCallBack callback)
 {
     this.trdenv             = trdenv;
     this.accID              = accID;
     this.trdMarket          = trdMarket;
     this.trdSide            = trdSide;
     this.orderType          = orderType;
     this.code               = code;
     this.qty                = qty;
     this.price              = price;
     this.adjustPrice        = adjustPrice;
     this.adjustSideAndLimit = adjustSideAndLimit;
     this.connID             = connID;
 }