/// <summary>
        /// HTD - Retrieves ticks for the previous [Days] days for the specified [Symbol].
        /// </summary>
        /// <param name="symbol"></param>
        /// <param name="days"></param>
        /// <param name="maxDatapoints"></param>
        /// <param name="beginFilterTime"></param>
        /// <param name="endFilterTime"></param>
        /// <param name="dataDirection"></param>
        /// <param name="requestId"></param>
        /// <param name="datapointsPerSend"></param>
        /// <returns></returns>
        public Task <IEnumerable <TickMessage> > GetHistoryTickDaysAsync(string symbol, int days, int?maxDatapoints = null, TimeSpan?beginFilterTime = null,
                                                                         TimeSpan?endFilterTime = null, DataDirection?dataDirection = null, string requestId = null, int?datapointsPerSend = null)
        {
            var request = _historicalRequestFormatter.ReqHistoryTickDays(symbol, days, maxDatapoints, beginFilterTime, endFilterTime, dataDirection, requestId, datapointsPerSend);

            return(string.IsNullOrEmpty(requestId) ? GetMessagesAsync(request, _historicalMessageHandler.GetTickMessages) : GetMessagesAsync(request, _historicalMessageHandler.GetTickMessagesWithRequestId));
        }
Beispiel #2
0
        public Task <string> GetHistoryTickDaysAsync(string symbol, int days, int?maxDatapoints = null, TimeSpan?beginFilterTime = null,
                                                     TimeSpan?endFilterTime = null, DataDirection?dataDirection = null, string requestId = null, int?datapointsPerSend = null)
        {
            var request = _historicalRequestFormatter.ReqHistoryTickDays(symbol, days, maxDatapoints, beginFilterTime, endFilterTime, dataDirection, requestId, datapointsPerSend);

            return(_lookupMessageFileHandler.GetFilenameAsync(request));
        }
 public void ReqHistoryTickDays()
 {
     var request = _historicalRequestFormatter.ReqHistoryTickDays("aapl", 180, 2000, new TimeSpan(9, 30, 00), new TimeSpan(16, 00, 00), 0, "TEST", 500);
     Assert.AreEqual(request, "HTD,AAPL,180,2000,093000,160000,0,TEST,500\r\n");
 }