Polygon.Client
2.0.0
dotnet add package Polygon.Client --version 2.0.0
NuGet\Install-Package Polygon.Client -Version 2.0.0
<PackageReference Include="Polygon.Client" Version="2.0.0" />
paket add Polygon.Client --version 2.0.0
#r "nuget: Polygon.Client, 2.0.0"
// Install Polygon.Client as a Cake Addin #addin nuget:?package=Polygon.Client&version=2.0.0 // Install Polygon.Client as a Cake Tool #tool nuget:?package=Polygon.Client&version=2.0.0
polygon-dotnet-client
.NET client for getting stocks, crypto, forex, and indices data from Polygon.io API.
<b> Independently developed, this is not an official library and I am not affiliated with Polygon. </b>
Prerequisites
Create an account with Polygon. Upon account creation, an API key will be provided for you.
You can manage your API keys on the Dashboard
Setup
Install the Polygon.Client NuGet package
Package Manager PM > Install-Package Polygon.Client
Using the API key that was generated for you earlier, you can create a Polygon client in the following ways.
Without Dependency Injection
using var client = new PolygonClient("API KEY GOES HERE");
With Dependency Injection
services.AddPolygonClient("API KEY GOES HERE");
Usage
public class SomeClass
{
private readonly IPolygonClient _polygonClient;
public SomeClass(IPolygonClient polygonClient)
{
_polygonClient = polygonClient;
}
public async Task<PolygonAggregateResponse> DoSomething()
{
// This will get all of the 1-minute bars for 2024-04-20
var request = new PolygonAggregatesRequest
{
Ticker = "SPY",
Multuplier = 1
Timespan = "minute",
From = "2024-04-20",
To = "2024-04-20"
};
var response = await _polygonClient.GetAggregatesAsync(request);
return response;
}
}
Supported Endpoints
Market Data Endpoints | Supported? |
---|---|
Aggregates | ✔️ |
Grouped Daily | ❌ |
Daily Open/Close | ❌ |
Previous Close | ❌ |
Trades | ❌ |
Last Trade | ❌ |
Quotes (NBBO) | ❌ |
Last Quote | ❌ |
Snapshot - All Tickers | ✔️ |
Snapshot - Gainers/Losers | ❌ |
Snapshot - Ticker | ❌ |
Snapshot - Universal | ❌ |
Technical Indicators - SMA | ❌ |
Technical Indicators - EMA | ❌ |
Technical Indicators - MACD | ❌ |
Technical Indicators - RSI | ❌ |
Reference Data Endpoints | Supported? |
---|---|
Tickers | ✔️ |
Ticker Details V3 | ✔️ |
Ticker Events | ❌ |
Ticker News | ❌ |
Ticker Types | ❌ |
Market Holidays | ❌ |
Market Status | ❌ |
Stock Splits V3 | ❌ |
Dividends V3 | ❌ |
Stock Financials VX | ❌ |
Conditions | ❌ |
Exchanges | ❌ |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Http (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Polygon.Client:
Package | Downloads |
---|---|
MarketViewer.Contracts
Add backtest v4 contracts |
|
MarketDataProvider.Contracts
.NET project containing models, request and response contracts for MarketDataProvider. |
|
Polygon.Client.DependencyInjection
Creates a .NET client for getting stocks, crypto, forex, and indices data from Polygon.io API via Dependency Injection. Independently developed, this is not an official library and I am not affiliated with Polygon. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 90 | 12/16/2024 |
1.5.0-preview.3 | 43 | 12/16/2024 |
1.5.0-preview.2 | 278 | 12/16/2024 |
1.5.0-preview.1 | 89 | 12/15/2024 |
1.4.0 | 2,999 | 3/28/2024 |
1.3.0 | 162 | 3/27/2024 |
1.3.0-preview.4 | 71 | 3/27/2024 |
1.3.0-preview.3 | 64 | 3/27/2024 |
1.3.0-preview.2 | 73 | 3/27/2024 |
1.3.0-preview.1 | 64 | 3/27/2024 |
1.2.0 | 103 | 3/26/2024 |
1.1.0 | 107 | 3/26/2024 |
1.0.0 | 118 | 3/26/2024 |
.NET client for getting stocks, crypto, forex, and indices data from Polygon.io API.
Independently developed, this is not an official library and I am not affiliated with Polygon.