CoinMarketCap-API 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoinMarketCap-API --version 1.2.0
NuGet\Install-Package CoinMarketCap-API -Version 1.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="CoinMarketCap-API" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoinMarketCap-API --version 1.2.0
#r "nuget: CoinMarketCap-API, 1.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.
// Install CoinMarketCap-API as a Cake Addin
#addin nuget:?package=CoinMarketCap-API&version=1.2.0

// Install CoinMarketCap-API as a Cake Tool
#tool nuget:?package=CoinMarketCap-API&version=1.2.0

CoinMarketCap API Client

A simple CoinMarketCap API v2 client written in C#.

Install with NuGet:

Install-Package CoinMarketCap-API

Examples

Get all listed cryptocurrencies:

var client = new CoinMarketCapClient();
var listingsResponse = await client.GetListingsAsync();

Get tickers rank 101-200 with quotes in USD:

var client = new CoinMarketCapClient();
var tickersResponse = await client.GetTickersAsync(101, Limit.Max, Sort.Rank, Currency.USD);

Get the top 100 cryptocurrency quotes in USD, sorted by market cap (rank):

var client = new CoinMarketCapClient();
var response = await client.GetTickersAsync(1, Limit.Max, Sort.Rank, Currency.USD);
var cryptoQuotes = response.Data.Select(x =>
{
	var quote = x.Value.Quotes[Currency.USD];
	return new
	{
		x.Value.Rank,
		x.Value.Id,
		x.Value.Name,
		x.Value.Symbol,
		quote.Price,
		quote.MarketCap,
		quote.Volume24H,
		quote.PercentChange1H,
		quote.PercentChange24H,
		quote.PercentChange7D,
	};
});

Sample output:

Rank Id Name Symbol Price MarketCap Volume24H PercentChange1H PercentChange24H PercentChange7D
1 1 Bitcoin BTC 7498.12 128034425490 4903930000 -0.12 -2.86 4.85
2 1027 Ethereum ETH 595.18 59442918526 1883770000 0.04 -4.06 13.82
3 52 Ripple XRP 0.661905 25974162166 491971000 0.04 -4.93 18.12
4 1831 Bitcoin Cash BCH 1111.48 19079707361 864788000 0.21 -7.04 23.81
5 1765 EOS EOS 13.559 12150890964 1291420000 0.03 -7.18 16.48
6 2 Litecoin LTC 119.829 6810645752 295669000 0.25 -4.63 6.51
7 2010 Cardano ADA 0.213002 5522517879 112359000 -0.64 -6.64 19.08
8 512 Stellar XLM 0.291827 5422172015 55032700 -0.23 -4.79 15.14
9 1720 IOTA MIOTA 1.71809 4775483184 100864000 -0.88 -5.32 25.99
10 1958 TRON TRX 0.0590979 3885575327 212389000 -0.08 -4.55 -1.98

Get ChainLink (LINK)'s ticker with quote in USD:

var client = new CoinMarketCapClient();
var chainlinkTicker = await client.GetTickerAsync(1975, Currency.USD);

Get ChainLink (LINK)'s ticker with quote in ETH:

var client = new CoinMarketCapClient();
var chainlinkTicker = await client.GetTickerAsync(1975, Currency.ETH);

Target Framework

.NET Standard 1.1

Dependencies

Newtonsoft.Json 11.0.2

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.1 is compatible.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 3,124 12/5/2018
1.2.0 1,455 6/18/2018