public RealRobot(TradingBaseStrategy tradingBaseStrategy, string token)
        {
            var connection = ConnectionFactory.GetConnection(token);

            _context                     = connection.Context;
            _tradingBaseStrategy         = tradingBaseStrategy;
            _tradingBaseStrategy.Context = _context;
            _tradePositions              = new List <TradePosition>();
        }
示例#2
0
        public SandboxRobot(TradingBaseStrategy tradingBaseStrategy, string token)
        {
            var connection = ConnectionFactory.GetSandboxConnection(token);

            _context                                = connection.Context;
            _tradingBaseStrategy                    = tradingBaseStrategy;
            _tradingBaseStrategy.Context            = _context;
            _tradingBaseStrategy.OnActionOperation += ProcessEventOperation;
            _tradePositions                         = new List <TradePosition>();
        }