public CQGCInstrumentHistoryProvider(CQGCAdapter adapter, CQGCInstrumentResolver instrumentResolver) { this.adapter = adapter; this.instrumentResolver = instrumentResolver; adapter.TimeBarReportReceived += TimeBarReportReceived; }
public CQGCFeed( CQGCAdapter adapter, CQGCInstrumentResolver instrumentResolver) { this.adapter = adapter; this.instrumentResolver = instrumentResolver; adapter.MarketDataResolved += MarketDataResolved; adapter.RealTimeMarketDataReceived += RealTimeMarketDataReceived; adapter.MarketDataSubscriptionStatusReceived += MarketDataSubscriptionStatusReceived; adapter.ContractMetadataReceived += ContractMetadataReceived; requestBatchTimer = new Timer(_ => SendBatchRequest(), null, 0, RequestBatchTimerInterval); }
/// <summary> /// Конструктор /// </summary> public CQGCConnector( CQGCParameters settings) { this.settings = settings; adapter = new CQGCAdapter(settings); var instrumentResolver = new CQGCInstrumentResolver(adapter, settings.InstrumentConverter); feed = new CQGCFeed(adapter, instrumentResolver); router = new CQGCRouter(adapter, instrumentResolver); historyProvider = new CQGCInstrumentHistoryProvider(adapter, instrumentResolver); ConnectionStatusProviders = new IConnectionStatusProvider[] { this }; adapter.ConnectionStatusChanged += AdapterConnectionStatusChanged; adapter.UserMessageReceived += UserMessageReceived; }
public CQGCRouter(CQGCAdapter adapter, CQGCInstrumentResolver instrumentResolver) { this.adapter = adapter; this.instrumentResolver = instrumentResolver; dispatcher = new TransactionDispatcher(this); this.adapter.AccountResolved += AccountResolved; this.adapter.PositionStatusReceived += PositionStatusReceived; this.adapter.TradeSnapshotCompletionReceived += TradeSnapshotCompletionReceived; this.adapter.TradeSubscriptionStatusReceived += TradeSubscriptionStatusReceived; this.adapter.OrderStatusReceived += OrderStatusReceived; this.adapter.CollateralStatusReceived += CollateralStatusReceived; this.adapter.OrderRequestRejectReceived += OrderRequestRejectReceived; instrumentResolver.InstrumentResolved += InstrumentResolved; }
public InstrumentSubscription( CQGCInstrumentResolver instrumentResolver, Instrument instrument, uint contractId) { this.instrumentResolver = instrumentResolver; Instrument = instrument; lockCookie = DeadlockMonitor.Cookie <InstrumentSubscription>("lockCookie-" + ContractId); ContractId = contractId; InstrumentParams = new InstrumentParams { Instrument = instrument }; InstrumentParams.VolaTranslatedByFeed = false; OrderBook = new OrderBook(); }