CoinMarketCapApi 1.0.1

CoinMarketCap Public and Pro Wrapper

CoinMarketCap Public and Pro API for .Net

Install-Package CoinMarketCapApi -Version 1.0.1
dotnet add package CoinMarketCapApi --version 1.0.1
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

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

Release Notes

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

Version History

Version Downloads Last updated
1.0.1 127 9/26/2018
1.0.0 115 9/24/2018