예제 #1
0
        private Task <List <byte[]> > QueryQuoteHistoryBarsFilesInternalAsync(DateTime timestamp, string symbol, string pereodicity, PriceType priceType)
        {
            if (!IsConnected)
            {
                throw new Exception("Client is not connected!");
            }

            // Create a new async context
            var context = new QueryQuoteHistoryBarsFilesAsyncContext();

            // Create a new QH cache request
            var request = new QueryBarsFileRequest(0)
            {
                RequestId   = Guid.NewGuid().ToString(),
                Timestamp   = timestamp,
                Symbol      = symbol,
                Periodicity = pereodicity,
                PriceType   = (SoftFX.Net.QuoteCache.PriceType)priceType
            };

            // Send request to the server
            _session.SendBarsFileRequest(context, request);

            // Return result task
            return(context.Tcs.Task);
        }
예제 #2
0
 public BarsFileAsyncContext(QueryQuoteHistoryBarsFilesAsyncContext parent)
 {
     ParentContext = parent;
 }