{"id":25748479,"url":"https://github.com/vslee/iexsharp","last_synced_at":"2025-04-09T09:09:42.809Z","repository":{"id":36363186,"uuid":"223657762","full_name":"vslee/IEXSharp","owner":"vslee","description":"IEX Cloud API for C# and other .net languages. Supports SSE streaming","archived":false,"fork":false,"pushed_at":"2022-08-14T04:34:51.000Z","size":1018,"stargazers_count":90,"open_issues_count":0,"forks_count":37,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-04-27T08:23:18.085Z","etag":null,"topics":["api","csharp","dotnet","finance","finance-api","finance-data","finance-derivatives","iex","iex-api","iex-cloud-api","iex-stock","iex-trading","iex-trading-api","iexcloud","iexfinance-api","iextrading","market-data","marketdata","sdk","sse-streaming"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vslee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-23T21:51:22.000Z","updated_at":"2023-12-13T10:26:45.000Z","dependencies_parsed_at":"2022-08-29T08:11:22.357Z","dependency_job_id":null,"html_url":"https://github.com/vslee/IEXSharp","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslee%2FIEXSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslee%2FIEXSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslee%2FIEXSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vslee%2FIEXSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vslee","download_url":"https://codeload.github.com/vslee/IEXSharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","dotnet","finance","finance-api","finance-data","finance-derivatives","iex","iex-api","iex-cloud-api","iex-stock","iex-trading","iex-trading-api","iexcloud","iexfinance-api","iextrading","market-data","marketdata","sdk","sse-streaming"],"created_at":"2025-02-26T12:30:20.387Z","updated_at":"2025-04-09T09:09:42.789Z","avatar_url":"https://github.com/vslee.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IEXSharp\n\nIEX Cloud API for C# and other .net languages. Supports SSE streaming.\n\n## Prerequisites\n\n This library currently targets `netstandard20`. Thus, it can be used with `.net framework 4.6.1`+ or `.net core 2.0`+\n\n## Usage\n![](https://github.com/vslee/iexsharp/workflows/prerelease%20NuGet/badge.svg) Prereleases are on [GH Packages](https://github.com/vslee/IEXSharp/packages). A new prerelease is built automatically after every commit. \n\n[![NuGet Badge](https://buildstats.info/nuget/VSLee.IEXSharp)](https://www.nuget.org/packages/VSLee.IEXSharp/) Releases are on [NuGet](https://www.nuget.org/packages/VSLee.IEXSharp/)\n\n### IEX Cloud\n```c#\npublic IEXCloudClient(string publishableToken, string secretToken, bool signRequest, bool useSandBox,\n\tAPIVersion version = APIVersion.stable, RetryPolicy retryPolicy = RetryPolicy.Exponential)\n```\nFirst, create an instance of `IEXCloudClient`\n```c#\n// For FREE and LAUNCH users\nIEXCloudClient iexCloudClient = \n\tnew IEXCloudClient(\"publishableToken\", \"secretToken\", signRequest: false, useSandBox: false); \n\n// For SCALE and GROW users\nIEXCloudClient iexCloudClient = \n\tnew IEXCloudClient(\"publishableToken\", \"secretToken\", signRequest: true, useSandBox: false); \n\n// Sandbox\nIEXCloudClient iexCloudClient = \n\tnew IEXCloudClient(\"publishableToken\", \"secretToken\", signRequest: false, useSandBox: true); \n```\nTo display historical prices. Read more about [DateTime in the wiki](https://github.com/vslee/IEXSharp/wiki/DateTime).\n```c#\nusing (var iexCloudClient = \n\tnew IEXCloudClient(\"publishableToken\", \"secretToken\", signRequest: false, useSandBox: false))\n{\n\tvar response = await iexCloudClient.StockPrices.HistoricalPriceAsync(\"AAPL\", ChartRange.OneMonth);\n\tif (response.ErrorMessage != null)\n\t{\n\t\tConsole.WriteLine(response.ErrorMessage);\n\t}\n\telse\n\t{\n\t   foreach (var ohlc in response.Data)\n\t   {\n\t      var dt = ohlc.GetTimestampInEST(); // note use of the extension method instead of ohlc.date\n\t      Console.WriteLine(\n\t   \t  $\"{dt} Open: {ohlc.open}, High: {ohlc.high}, Low: {ohlc.low}, Close: {ohlc.close}, Vol: {ohlc.volume}\");\n\t   }\n\t}\n}\n\n```\nTo use SSE streaming (only included with paid IEX subscription plans). Extended [example in the wiki](https://github.com/vslee/IEXSharp/wiki/SSE-Streaming-Example).\n```c#\nusing (var sseClient = iexCloudClient.StockPrices.QuoteStream(symbols: new string[] { \"spy\", \"aapl\" }, \n\tUTP: false, interval: StockQuoteSSEInterval.OneSecond))\n{\n\tsseClient.Error += (s, e) =\u003e\n\t{\n\t\tConsole.WriteLine(\"Error Occurred. Details: {0}\", e.Exception.Message);\n\t};\n\tsseClient.MessageReceived += m =\u003e\n\t{\n\t\tConsole.WriteLine(m.ToString());\n\t};\n\tawait sseClient.StartAsync(); // this will block until Stop() is called\n}\n\n```\nAdditional usage examples are illustrated in the test project: [`IEXSharpTest`](https://github.com/vslee/IEXSharp/tree/master/IEXSharpTest/Cloud)\n\n### Legacy\n\nIEX has deprecated most of their [legacy API](https://iextrading.com/developers/docs/). However, some functions are still active and you can access them via:\n```c#\nIEXLegacyClient iexLegacyClient = new IEXLegacyClient();\n```\n\n## Contributing\n\nWe welcome pull requests! See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)\n\n## Disclaimers\n\nData provided for free by [IEX](https://iextrading.com/) via their [IEX Cloud API](https://iexcloud.io/docs/api/)\nPer their [guidelines](https://iexcloud.io/docs/api/#disclaimers):\n- Required: If you display any delayed price data, you must display “15 minute delayed price” as a disclaimer.\n- Required: If you display latestVolume you must display “Consolidated Volume in Real-time” as a disclaimer.\n- Required: If you use cash flow, income statement, balance sheet, financials, or fundamentals endpoints, use must display “Data provided by New Constructs, LLC © All rights reserved.”\n- Note on pricing data: All CTA and UTP pricing data is delayed at least 15 minutes.\n\nThis project is not related to the similarly named [IEX-Sharp](https://iexsharp.com/)\n\n## Acknowledgments\n\n* Thanks to [Zhirong Huang (ZHCode)](https://zh-code.com/) for his great foundational work on this library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvslee%2Fiexsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvslee%2Fiexsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvslee%2Fiexsharp/lists"}