public MarketBarHistoryFileReport QueryBarHistoryFile(DateTime from, DateTime to, string symbol, string periodicity, FxPriceType priceType) { if (to != from) { throw new Exception("Range bar history queries are unsupported"); } var type = StorageConvert.ToPriceType(priceType); return(this.Attempt(this.DoQueryBarHistoryFile, from, symbol, periodicity, type)); }
public TickTraderHistoryInfo GetBarsHistoryInfo(string symbol, Periodicity periodicity, FxPriceType priceType) { var apiPriceType = StorageConvert.ToPriceType(priceType); var apiPeriodicity = StorageConvert.ToBarPeriod(periodicity); var info = this.dataFeed.Server.GetBarsHistoryFiles(symbol, ZeroDateTime, apiPriceType, apiPeriodicity.ToString()); var result = new TickTraderHistoryInfo { AvailableFrom = info.FromAll, AvailableTo = info.ToAll }; return(result); }
/// <summary> /// Reads data chunk for a specified symbol. /// </summary> /// <param name="symbol">Can not be null.</param> /// <param name="periodicity">Can not be null.</param> /// <param name="priceType"></param> /// <returns>Can not be null</returns> byte[] GetBarMetadataFile(string symbol, string periodicity, FxPriceType priceType) { var type = StorageConvert.ToPriceType(priceType); return(this.Attempt(this.DoGetBarMetadataFile, symbol, type, periodicity)); }