public Quote GetQuote(string symbol) { string requestUrl = string.Format(this.GetIEXBaseRequestUri(IEXRequestType.Quote), symbol); string jsonstring = base.GetString(requestUrl).Result; return(SerializerHandler.DeserializeObj <Quote>(jsonstring)); }
public Stat GetKeyStats(string symbol) { string reportUrl = string.Format(this.GetIEXBaseRequestUri(IEXRequestType.Stats), symbol); string jsonstring = base.GetString(reportUrl).Result; return(SerializerHandler.DeserializeObj <Stat>(jsonstring)); }
public Company GetCompany(string symbol) { string requestUrl = string.Format(this.GetIEXBaseRequestUri(IEXRequestType.CompanyInfo), symbol); string jsonstring = base.GetString(requestUrl).Result; return(SerializerHandler.DeserializeObj <Company>(jsonstring)); }
public Financials GetFinancialReport(string symbol, Period period) { string reportUrl = string.Format(this.GetIEXBaseRequestUri(IEXRequestType.Financial), symbol, period.ToString()); string jsonstring = base.GetString(reportUrl).Result; Financials result = SerializerHandler.DeserializeObj <Financials>(jsonstring); return(result); }
/// <summary> /// BatchReport of financial reports as annually or quarterly /// </summary> /// <param name="symbols"></param> /// <param name="period"></param> /// <returns></returns> public List <Chart> GetBatchFinancials(string[] symbols, Period period = Period.Annual) { string requestUrl = string.Format(this._dictRequestUrl[IEXRequestType.BatchReportFinancialForMultiStocks], symbols, period); string jsonstring = base.GetString(requestUrl).Result; List <Chart> result = SerializerHandler.DeserializeObj <List <Chart> >(jsonstring); return(result); }
public List <Chart> GetHistoricData(string symbol, ChartOption chartOption) { string optionStr = chartOption.ToString().StartsWith("_") ? chartOption.ToString().Remove(0, 1) : chartOption.ToString(); string requestUrl = string.Format(this.GetIEXBaseRequestUri(IEXRequestType.Chart), symbol, optionStr); string jsonstring = base.GetString(requestUrl).Result; List <Chart> result = SerializerHandler.DeserializeObj <List <Chart> >(jsonstring); return(result); }
public BatchReport GetBatchReport(string symbol, IEnumerable <IEXDataType> types, ChartOption range, int itemCount) { string rangeStr = range.ToString().StartsWith("_") ? range.ToString().Remove(0, 1) : range.ToString(); string baseRequestUri = GetIEXBaseRequestUri(IEXRequestType.BatchReportForAStock); string requestUrl = string.Format(baseRequestUri, symbol, types.ToStringDelimeter(), rangeStr, itemCount.LimitToMax()); Console.WriteLine(requestUrl); string jsonstring = base.GetString(requestUrl).Result; return(SerializerHandler.DeserializeObj <BatchReport>(jsonstring)); }
public Dictionary <string, BatchReport> GetBatchReport(string[] symbols, IEnumerable <IEXDataType> types, ChartOption range, int itemCount, Period period = Period.Annual) { string rangeStr = range.ToString().StartsWith("_") ? range.ToString().Remove(0, 1) : range.ToString(); string baseRequestUri = GetIEXBaseRequestUri(IEXRequestType.BatchReportMarketForMultiStocks); string requestUrl = string.Format( baseRequestUri, symbols.ToStringDelimeter(), types.ToStringDelimeter(), rangeStr, itemCount.LimitToMax()); if (types.Contains(IEXDataType.financials)) { requestUrl = requestUrl + $"&period={period}"; } requestUrl = requestUrl.ToLower(); Console.WriteLine(requestUrl); string jsonstring = base.GetString(requestUrl.ToLower()).Result; return(SerializerHandler.DeserializeObj <Dictionary <string, BatchReport> >(jsonstring)); }