Пример #1
0
        public void addToFerret(Fields fields, OrderSubmitter submitter)
        {
            fields.put("SYMBOL", symbol.name);
            details.addToFerret(fields);
            duration.addToFerret(fields);
            ferretSubmission = new OrderSubmission();
            ferretSubmission.addToFerretOrderSubmit(fields);
            fields.put("SIDE", direction.longShort("BUY", "SELL"));
            fields.put("QUANTITY", size);
            var config = configs.get(symbol.type());

            fields.put("PLATFORM", config.platform());
            fields.put("ROUTE", config.route());
            fields.put("SECURITYTYPE", symbol.type().Equals("Future") ? "FUTURES" : "EQUITY");
            fields.put("STATUS", "NEW");
            fields.put("MESSAGETYPE", "NewOrder");
        }
Пример #2
0
 public LiveTradeMonitor(LiveSystem liveSystem, IEnumerable <Symbol> symbols, string topicPrefix)
 {
     positionMonitor = new PositionMonitor(liveSystem, symbols, topicPrefix);
     orderSubmitter  = new OrderSubmitter(liveSystem, topicPrefix);
     systemHeartbeat = dictionary(symbols, symbol => new SystemHeartbeat(liveSystem, symbol, topicPrefix));
 }