CoinGecko.Api
0.2.0
dotnet add package CoinGecko.Api --version 0.2.0
NuGet\Install-Package CoinGecko.Api -Version 0.2.0
<PackageReference Include="CoinGecko.Api" Version="0.2.0" />
<PackageVersion Include="CoinGecko.Api" Version="0.2.0" />
<PackageReference Include="CoinGecko.Api" />
paket add CoinGecko.Api --version 0.2.0
#r "nuget: CoinGecko.Api, 0.2.0"
#:package CoinGecko.Api@0.2.0
#addin nuget:?package=CoinGecko.Api&version=0.2.0
#tool nuget:?package=CoinGecko.Api&version=0.2.0
CoinGecko.Api
Strongly typed, AOT-safe .NET client for the CoinGecko REST API.
Install
dotnet add package CoinGecko.Api
Quickstart (ASP.NET Core / Minimal Hosting)
builder.Services.AddCoinGeckoApi(opts =>
{
opts.ApiKey = builder.Configuration["CoinGecko:ApiKey"];
opts.Plan = CoinGeckoPlan.Demo; // or Analyst / Lite / Pro / ProPlus / Enterprise
});
// Inject ICoinGeckoClient anywhere:
public sealed class PriceService(ICoinGeckoClient gecko)
{
public Task<Coin> GetBtcAsync(CancellationToken ct)
=> gecko.Coins.GetAsync("bitcoin", ct: ct);
}
Quickstart (Console / scripts)
using var gecko = CoinGeckoClientFactory.Create("my-api-key", CoinGeckoPlan.Pro);
var btc = await gecko.Coins.GetAsync("bitcoin");
Console.WriteLine($"BTC: ${btc.MarketData.CurrentPrice["usd"]}");
See the full documentation for all 14 sub-clients, streaming (CoinGecko.Api.WebSockets), and AI Agent Hub integrations (CoinGecko.Api.AiAgentHub, CoinGecko.Api.AiAgentHub.Mcp).
License
MIT © msanlisavas
| 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Options (>= 10.0.7)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.7)
-
net9.0
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Options (>= 10.0.7)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.7)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CoinGecko.Api:
| Package | Downloads |
|---|---|
|
CoinGecko.Api.AiAgentHub
Microsoft.Extensions.AI function tools backed by CoinGecko's REST API. Drop CoinGecko capabilities into any IChatClient-compatible agent (OpenAI, Anthropic, Azure OpenAI, Ollama, Gemini, Bedrock, …) in one line. |
|
|
CoinGecko.Api.WebSockets
Streaming client for CoinGecko's beta WebSocket endpoint (wss://stream.coingecko.com/v1). Four typed channels: coin prices, onchain token prices, DEX trades, DEX OHLCV. Builds on CoinGecko.Api. In preview while upstream protocol is beta. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 110 | 4/28/2026 |
| 0.1.1 | 103 | 4/21/2026 |
| 0.1.0 | 96 | 4/21/2026 |
| 0.0.0-alpha.0.91 | 59 | 4/21/2026 |