Пример #1
0
 private void OnLogin(TWSClientInfo clientInfo, TWSClientId clientId)
 {
     if (Server != null)
     {
         Server.OnLogin(this, clientInfo, clientId);
     }
 }
Пример #2
0
 public virtual void OnLogin(TWSServerClientState clientState, TWSClientInfo clientInfo, TWSClientId clientId)
 {
     if (Login != null)
     {
         Login(this, new TWSServerEventArgs(clientState));
     }
 }
 private void OnLogin(TWSClientInfo clientInfo, TWSClientId clientId)
 {
   if (Server != null)
     Server.OnLogin(this, clientInfo, clientId);
 }
Пример #4
0
 public virtual void OnLogin(TWSServerClientHandler clientState, TWSClientInfo clientInfo, TWSClientId clientId)
 {
   if (Login != null)
     Login(this, new TWSServerLoginEventArgs(clientState));
 }
Пример #5
0
    /// <summary>
    /// Construct a new TWSClient object for connecting to IB's Trader WorkStation
    /// </summary>
    public TWSClient()
    {
      _tcpClient = null;
      _stream = null;
      _thread = null;
      Status = TWSClientStatus.Unknown;
      _twsTime = String.Empty;
      _nextValidId = 0;

      _orderIds = new Dictionary<string, int>();

      ClientInfo = new TWSClientInfo();

      NUMBER_DECIMAL_SEPARATOR = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
      EndPoint = new IPEndPoint(new IPAddress(new byte[] {127, 0, 0, 1}), DEFAULT_PORT);

      _settings = new TWSClientSettings();
    }
 void OnLogin(TWSClientInfo clientInfo, TWSClientId clientId)
 {
     Server?.OnLogin(this, clientInfo, clientId);
 }
Пример #7
0
 void OnLogin(TWSClientInfo clientInfo, TWSClientId clientId)
 {
     Server?.OnLogin(this, clientInfo, clientId);
     Login?.Invoke(this, new TWSServerEventArgs(this));
 }
Пример #8
0
 public virtual void OnLogin(TWSServerClientHandler clientState, TWSClientInfo clientInfo, TWSClientId clientId)
 {
     Login?.Invoke(this, new TWSServerLoginEventArgs(clientState));
 }
Пример #9
0
        public TWSClient()
        {
            _tcpClient = null;
            _stream = null;
            _thread = null;
            Status = TWSClientStatus.Unknown;
            _twsTime = String.Empty;
            _nextValidId = 0;

            //_historicalDataRecords = new Dictionary<int, TWSMarketDataSnapshot>();
            _marketDataRecords = new Dictionary<int, TWSMarketDataSnapshot>();
            //_marketDepthRecords = new Dictionary<int, TWSMarketDataSnapshot>();
            _orderRecords = new Dictionary<int, OrderRecord>();
            _internalDetailRequests = new Dictionary<IBContract, KeyValuePair<AutoResetEvent, IBContractDetails>>();
            _orderIds = new Dictionary<string, int>();

            ClientInfo = new TWSClientInfo();

            NUMBER_DECIMAL_SEPARATOR = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
            EndPoint = new IPEndPoint(new IPAddress(new byte[] { 127, 0, 0, 1 }), DEFAULT_PORT);

            _settings = new TWSClientSettings();
        }