CoinMarketCapApi 1.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package CoinMarketCapApi --version 1.0.1
NuGet\Install-Package CoinMarketCapApi -Version 1.0.1
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="CoinMarketCapApi" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoinMarketCapApi --version 1.0.1
#r "nuget: CoinMarketCapApi, 1.0.1"
#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 CoinMarketCapApi as a Cake Addin
#addin nuget:?package=CoinMarketCapApi&version=1.0.1

// Install CoinMarketCapApi as a Cake Tool
#tool nuget:?package=CoinMarketCapApi&version=1.0.1

CoinMarketCap API Wrapper for .Net

A .Net wrapper for the CoinMarketCap API as described on CoinMarketCap Public API and Professional API, including all features the API provides using clear and readable objects.

If you think something is broken, something is missing or have any questions, please open an Issue

Donations

Donations are greatly appreciated and a motivation to keep improving.

BTC: 1CCiBxQPbng46X7yiRjMPpiMwBn6jeT8v1 ETH: 0x068cbd8cdeb6712185f17d88d2cba06f40da2e4d NANO: xrb_1xh45zbu1gkr7syu6nxdbds4ce3jbqkuh6frp46nq8icmti3r49yr4jbgqgp

Installation

Nuget version Nuget downloads Available on Nuget.

pm> Install-Package CoinMarketCapApi

Getting started

After installing it's time to actually use it. To get started we have to add the CoinMarketCap namespace: using CoinMarketCap;.

CoinMarketCap provides two clients to interact with the API. The PublicClient provides all rest Public API calls. The ProClient provides functions to interact with the Professional API calls. Both clients are disposable and as such can be used in a usingstatement.

Most API methods are available in two flavors, sync and async:

public void NonAsyncMethod()
{
    using(var client = new PublicClient())
    {
        var result = client.Global();
    }
}

public async Task AsyncMethod()
{
    using(var client = new PublicClient())
    {
        var result2 = await client.GlobalAsync();
    }
}

Examples

Examples can be found in the Examples folder.

Response handling

All API requests will respond with an Metadata(for public) or Status(for pro) object. This object contains whether the call was successful, the data returned from the call and an error if the call wasn't successful. As such, one should always check the Success flag when processing a response. For example:

using(var client = new PublicClient())
{
	var result = client.Tickers();
	if (result.Success)
		Console.WriteLine($"Server time: {result.Data}");
	else
		Console.WriteLine($"Error: {result.Metadata.Error}");
}

Release notes

  • Version 1.0.1 - 26 sep 2018

    • Fixed some variables types according to returned value is null or not
  • Version 1.0.0 - 24 sep 2018

    • First release of Library
Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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

This is the first release of CoinMarketCap Public and Pro API for .Net