diff --git a/FinnHubSharp/DataModels/Response/StreamingQuote.cs b/FinnHubSharp/DataModels/Response/StreamingQuote.cs index 6c594d0..3d78cf6 100644 --- a/FinnHubSharp/DataModels/Response/StreamingQuote.cs +++ b/FinnHubSharp/DataModels/Response/StreamingQuote.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using Newtonsoft.Json; diff --git a/FinnHubSharp/FinnHubSharp.csproj b/FinnHubSharp/FinnHubSharp.csproj index 8ce2976..7c0ff12 100644 --- a/FinnHubSharp/FinnHubSharp.csproj +++ b/FinnHubSharp/FinnHubSharp.csproj @@ -3,15 +3,15 @@ netstandard2.1 FinnHubSharp - 1.0.0 + 1.0.2 Shravan Jambukesan Pseudo Markets true .NET Standard client for FinnHub finance APIs - (c) 2020 Pseudo Markets + (c) 2020 - 2021 Pseudo Markets https://github.com/pseudomarkets/FinnHubSharp - * Initial release + * Added support for streaming data FinnHub 8 diff --git a/FinnHubSharp/Interfaces/IFinnHubStreamerClient.cs b/FinnHubSharp/Interfaces/IFinnHubStreamerClient.cs index 69973df..4318f82 100644 --- a/FinnHubSharp/Interfaces/IFinnHubStreamerClient.cs +++ b/FinnHubSharp/Interfaces/IFinnHubStreamerClient.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using FinnHubSharp.DataModels.Request; diff --git a/FinnHubSharp/Logging/FinnHubSharpLogger.cs b/FinnHubSharp/Logging/FinnHubSharpLogger.cs index fd56496..006f522 100644 --- a/FinnHubSharp/Logging/FinnHubSharpLogger.cs +++ b/FinnHubSharp/Logging/FinnHubSharpLogger.cs @@ -1,7 +1,4 @@ -using System; -using System.Net; using System.Net.Http; -using Microsoft.Extensions.Logging; namespace FinnHubSharp.Logging { diff --git a/FinnHubSharpConsole/Program.cs b/FinnHubSharpConsole/Program.cs index af04d28..18c8904 100644 --- a/FinnHubSharpConsole/Program.cs +++ b/FinnHubSharpConsole/Program.cs @@ -2,14 +2,10 @@ using System.Linq; using System.Net.Http; using System.Net.WebSockets; -using System.Threading; using System.Threading.Tasks; -using FinnHubSharp; using FinnHubSharp.DataModels.Request; using FinnHubSharp.Implementations; -using FinnHubSharp.Interfaces; using FinnHubSharp.Logging; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Newtonsoft.Json; diff --git a/README.md b/README.md index fb11259..da70b1b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,22 @@ # FinnHubSharp -.NET Standard client for accessing FinnHub.io finance APIs +.NET Standard client for accessing FinnHub.io finance APIs, including streaming data via WebSocket # Requirements -* .NET Standard 2.0 -* Newtonsoft.JSON +* .NET Standard 2.1 # Usage -`using FinnHubSharp;` +`using FinnHubSharp.DataModels.Request;` -`FinnHubClient client = new FinnHubClient("YOUR_API_KEY");` +`using FinnHubSharp.Implementations;` + +`using FinnHubSharp.Logging;` + +`var client = new FinnHubClient(new HttpClient(), "YOUR_API_KEY", new NullLogger());` `var quote = await client.GetQuoteAsync("AAPL");` -`var price = quote.CurrentPrice;` +`double price = quote.CurrentPrice;` # NuGet