Skip to content

C# implementation of a CryptoCompare api client, with websocket streaming

License

Notifications You must be signed in to change notification settings

trakx/cryptocompare-api-client

Repository files navigation

cryptocompare-api-client

.NET Core Codacy Badge Codacy Badge

logo

An async-based CryptoCompare API client library for .NET and .NET Core

Supported platforms

  • .NET Core 1.0
  • .NET Framework 4.5
  • Mono 4.6
  • Xamarin.iOS 10.0
  • Xamarin.Android 7.0
  • Universal Windows Platform 10
  • Windows 8.0
  • Windows Phone 8.1

Installation

This CryptoCompare api wrapper library is available on NuGet

Package manager

Install-Package CryptoCompare

.NET CLI

dotnet add package CryptoCompare

Paket CLI

paket add CryptoCompare

Creating your local .env file

In order to be able to run some integration tests, you should create a .env file in the src folder with the following variables:

CryptoCompareApiConfiguration__ApiKey=********

Basic usage

// Using ctor
 var client = new CryptoCompareClient();
 var eth = await client.Coins.SnapshotFullAsync(7605);
 Console.WriteLine(eth.Data.General.Name);

// Using Singleton 
var btc = await CryptoCompareClient.Instance.Coins.SnapshotFullAsync(1182);
Console.WriteLine(eth.Data.General.Name);

Contributors


monsieurleberre

💻 ⚠️

Anton

💻 ⚠️

cohowap

💻 ⚠️

License

License

FOSSA Status

AWS Parameters

In order to be able to run some integration tests, you should ensure that you have access to the AWS parameters starting in /CiCd. In order for the applications in this solution to run correctly on AWS, please ensure that variables starting in /[environment] are defined for all 3 environments ( Production, Staging, Development ) :

# REPOSITORY SECRETS
/[environment]/Trakx/CryptoCompare/ApiClient/CryptoCompareApiConfiguration/ApiKey

# GLOBAL SECRETS
# Instead of creating a specific repository secret, can use the global one with the same [Key]
/[environment]/Global/CryptoCompareApiConfiguration/ApiKey

About

C# implementation of a CryptoCompare api client, with websocket streaming

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages