public async Task <IEnumerable <Future> > ReqChainFutureAsync(string symbol, string monthCodes, string years, int?nearMonths = null, string requestId = null) { var request = _chainsRequestFormatter.ReqChainFuture(symbol, monthCodes, years, nearMonths, requestId); var messages = await GetMessagesAsync(request, _chainsMessageHandler.GetFutureMessages).ConfigureAwait(false); return(messages.First().Chains); }
public async Task <IEnumerable <Future> > GetChainFutureAsync(string symbol, string monthCodes, string years, int?nearMonths = null, string requestId = null) { if (!string.IsNullOrEmpty(requestId)) { throw new NotSupportedException("RequestId parsing isn't supported for Chains!"); } var request = _chainsRequestFormatter.ReqChainFuture(symbol, monthCodes, years, nearMonths, requestId); var messages = await GetMessagesAsync(request, _chainsMessageHandler.GetFutureMessages).ConfigureAwait(false); return(messages.First().Chains); }
public Task <IEnumerable <FutureMessage> > ReqChainFutureAsync(string symbol, string monthCodes, string years, int?nearMonths = null, string requestId = null) { var request = _chainsRequestFormatter.ReqChainFuture(symbol, monthCodes, years, nearMonths, requestId); return(GetMessagesAsync(request, _chainsMessageHandler.GetFutureMessages)); }
public async Task <IEnumerable <FutureMessage> > GetChainFutureMessagesAsync(string symbol, string monthCodes, string years, int?nearMonths = null, string requestId = null) { var request = _chainsRequestFormatter.ReqChainFuture(symbol, monthCodes, years, nearMonths, requestId); return(await(string.IsNullOrEmpty(requestId) ? GetMessagesAsync(request, _chainsMessageHandler.GetFutureMessages) : GetMessagesAsync(request, _chainsMessageHandler.GetFutureMessagesWithRequestId)).ConfigureAwait(false)); }