public HistoryInfo GetBarsInfo(string symbol, PriceType priceType, BarPeriod period) { try { var source = this.GetRemoteOrLocalSource(symbol); var periodicity = StorageConvert.ToPeriodicity(period); var priceTypeEx = StorageConvert.ToFxPriceType(priceType); var info = source.GetBarsHistoryInfo(symbol, periodicity, priceTypeEx); var result = new HistoryInfo(info.AvailableFrom.Value, info.AvailableTo.Value); return result; } catch (StorageHistoryNotFoundException ex) { throw new HistoryNotFoundException("GetBarsInfo", ex); } }
public HistoryInfo GetQuotesInfo(string symbol, int depth) { try { var source = this.GetRemoteOrLocalSource(symbol); var isLevel2 = depth != 1; var info = source.GetTicksHistoryInfo(symbol, isLevel2); var result = new HistoryInfo(info.AvailableFrom.Value, info.AvailableTo.Value); return result; } catch (StorageHistoryNotFoundException ex) { throw new HistoryNotFoundException("GetQuotesInfo", ex); } }