Esempio n. 1
0
        private static double getMktData(EClientSocket client, EWrapperImpl Allture, string symbol, string sectype, string expiration, string exchange)
        {
            if (string.IsNullOrEmpty(expiration))
            {
                client.reqMktData(1005, ContractSamples.Contract_RT(symbol, sectype, exchange), string.Empty, false, false, null);
            }
            else
            {
                client.reqMktData(1005, ContractSamples.Contract_FUT(symbol, sectype, expiration, exchange), string.Empty, false, false, null);
            }

            Thread.Sleep(sleep2);
            client.cancelMktData(1005);
            // Thread.Sleep(sleep0);
            Console.WriteLine("\n price: " + Allture.mkt_price + "\n");
            return(Allture.mkt_price);
        }