CoinGecko.Api 0.2.0

dotnet add package CoinGecko.Api --version 0.2.0
                    
NuGet\Install-Package CoinGecko.Api -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoinGecko.Api" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoinGecko.Api" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="CoinGecko.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoinGecko.Api --version 0.2.0
                    
#r "nuget: CoinGecko.Api, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoinGecko.Api@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoinGecko.Api&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=CoinGecko.Api&version=0.2.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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