Skip to content

amittleider/IEXDotNet

Repository files navigation

Update on Fundamentals - Jan 2021

IEX has updated their Fundamentals endpoints in 2021 to be called now "Advanced Fundamentals". This advanced fundamentals dataset is a pass-through to New Constructs. It should be noted that New Constructs is significantly cheaper than IEX, so it is recommended to integrate with New Constructs directly for fundamentals. New constructs covers very large companies, but mid-caps and small-caps are hard to find. If that's the type of thing you're looking for, I'd recommend checking out the Shardar dataset on Quandl.

IEXDotNet

C# wrapper for IEX APIs. http://iexcloud.io/docs/api/

Examples

  • Initialize a formatter object
IEXFormatter formatter = new IEXFormatter();
  • Get IEX Symbols
IEXClient client = new IEXClient(IEXBaseUrl.SandboxUrl, token);
string symbols = await client.GetIEXSymbols();
List<IexIexSymbol> symbolsList = formatter.FormatIexIexSymbols(symbols);
  • Get advanced fundamental data
IEXClient client = new IEXClient(IEXBaseUrl.SandboxUrl, token);
string advancedFundamentalsJson = await client.GetTimeSeriesFundamentals("MSFT", "annual", new DateTime(2000, 1, 1), DateTime.Now);
List<IexAdvancedFundamentals> advancedFundamentals = formatter.FormatTimeSeriesFundamentals(advancedFundamentalsJson);
  • Get historical prices
IEXClient client = new IEXClient(IEXBaseUrl.SandboxUrl, token);
string historicalPricesJson = await client.GetHistoricalPrices("msft", "5d");
// string result = await client.GetHistoricalPrices("msft", "5d", chartCloseOnly: true);
List<IEXHistoricalPrice> historicalPrices = formatter.FormatHistoricalPrices(historicalPricesJson);
  • Get dividends
IEXClient client = new IEXClient(IEXBaseUrl.SandboxUrl, token);
string dividend = await client.GetDividends("MSFT", "1y");
List<IexDividend> iexDividend = formatter.FormatDividends(dividend);
  • Streaming news
IexSseClient client = new IexSseClient(IEXBaseUrl.SandboxSseUrl, token);
client.NewsEvent += (sender, e) => 
{
    System.Console.WriteLine(e);
};

await client.SubscribeToNewsStream("spy", tokenSource.Token); // Blocking
// client.SubscribeToNewsStream("spy", tokenSource.Token); // Non-blocking

See the tests for all examples: IEXClientTests.cs and IexSscClientTests.cs

Builds

Build Status

Nuget package

https://www.nuget.org/packages/IEXDotNet/

IEX Referral

Consider using me as a referral on IEX by signing up with this link: https://iexcloud.io/s/635df1db

About

C# API wrapper on IEX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages