예제 #1
0
        private void RaiseHardcodedDataEvents()
        {
            if (!Sandbox || SandboxSecurities == null)
            {
                return;
            }

            var products = SandboxSecurities.Select(sec => new ProductInfo
            {
                companyName  = sec.Name,
                exchange     = sec.Board.Exchange.Name,
                securityType = "EQ",
                symbol       = sec.Code
            }).ToArray();

            ProductLookupResult.SafeInvoke(0, products, null);
        }
예제 #2
0
        public void LookupSecurities(string name, long transactionId)
        {
            if (!IsConnected)
            {
                throw new InvalidOperationException(LocalizedStrings.Str3356);
            }

            if (name.IsEmpty())
            {
                throw new InvalidOperationException(LocalizedStrings.Str3357);
            }

            _marketModule.ExecuteUserRequest(new ETradeProductLookupRequest(name), response =>
            {
                ProductLookupResult.SafeInvoke(transactionId, response.Data, response.Exception);
                _orderModule.ResetOrderUpdateSettings(null, true);
            });
        }