CryptoClients.Net 4.8.1

dotnet add package CryptoClients.Net --version 4.8.1
                    
NuGet\Install-Package CryptoClients.Net -Version 4.8.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="CryptoClients.Net" Version="4.8.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CryptoClients.Net" Version="4.8.1" />
                    
Directory.Packages.props
<PackageReference Include="CryptoClients.Net" />
                    
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 CryptoClients.Net --version 4.8.1
                    
#r "nuget: CryptoClients.Net, 4.8.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.
#:package CryptoClients.Net@4.8.1
                    
#: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=CryptoClients.Net&version=4.8.1
                    
Install as a Cake Addin
#tool nuget:?package=CryptoClients.Net&version=4.8.1
                    
Install as a Cake Tool

CryptoClients.Net CryptoClients.Net

.NET NuGet version NuGet downloads License

CryptoClients.Net provides unified access to cryptocurrency trading APIs in C#.

It combines:

  • direct access to exchange-specific REST and WebSocket clients
  • shared cross-exchange interfaces from CryptoExchange.Net
  • dynamic multi-exchange requests and subscriptions
  • client-side helpers such as rate limiting, order books, trackers, and user client management

The library currently supports 27 exchanges and additional platform integrations such as CoinGecko and Polymarket.

Features

  • Full access to exchange-specific APIs through ExchangeRestClient and ExchangeSocketClient
  • Shared exchange-agnostic interfaces for spot and futures functionality
  • Request data from a single exchange or many exchanges in one call
  • Subscribe to one or many data streams on multiple exchanges through a single API
  • Strongly typed models and enum mappings
  • Automatic WebSocket (re)connection management
  • Client-side rate limiting
  • Client-side order book support
  • Multi-user client management
  • Support for multiple API environments
  • Dynamic credential management

Quick example

var client = new ExchangeRestClient();
var symbol = new SharedSymbol(TradingMode.Spot, "ETH", "USDT");

var results = await client.GetSpotTickerAsync(
    new GetTickerRequest(symbol),
    ["Binance", "Bybit", "HyperLiquid", "OKX"]);

foreach (var result in results)
{
    if (!result.Success)
        Console.WriteLine($"{result.Exchange} error: {result.Error}");
    else
        Console.WriteLine($"{result.Exchange} price: {result.Data.LastPrice}");
}

For more examples, see the documentation or the full demo application:
https://github.com/JKorf/CryptoManager.Net

Installation

NuGet

dotnet add package CryptoClients.Net

GitHub Packages

CryptoClients.Net is also available on GitHub Packages.

Add the following NuGet source:

https://nuget.pkg.github.com/JKorf/index.json

Download release

Latest releases are available here:
https://github.com/JKorf/CryptoClients.Net/releases

Getting started

There are two main entry points:

  • ExchangeRestClient for REST APIs
  • ExchangeSocketClient for WebSocket APIs

You can also use exchange-specific clients directly, such as BinanceRestClient or KucoinSocketClient.

Dependency injection

// Load options from configuration
builder.Services.AddCryptoClients(builder.Configuration.GetSection("CryptoClients"));

// Or configure in code
builder.Services.AddCryptoClients(options =>
{
    options.OutputOriginalData = true;
});

// Inject later
public class TradingBot
{
    public TradingBot(IExchangeRestClient restClient, IExchangeSocketClient socketClient)
    {
    }
}

Direct construction

IExchangeRestClient restClient = new ExchangeRestClient();
IExchangeSocketClient socketClient = new ExchangeSocketClient();

IBinanceRestClient binanceRestClient = new BinanceRestClient();
IKucoinSocketClient kucoinSocketClient = new KucoinSocketClient();

Configuration

Clients can be configured globally, per exchange, or both.

builder.Services.AddCryptoClients(globalOptions =>
{
    globalOptions.OutputOriginalData = true;
    globalOptions.ApiCredentials = new ExchangeCredentials
    {
        Binance = new BinanceCredentials("BinanceKey", "BinanceSecret"),
        Kucoin = new KucoinCredentials("KucoinKey", "KucoinSecret", "KucoinPassphrase"),
        OKX = new OKXCredentials("OKXKey", "OKXSecret", "OKXPassphrase")
    };
},
bybitRestOptions: bybitOptions =>
{
    bybitOptions.Environment = Bybit.Net.BybitEnvironment.Eu;
    bybitOptions.ApiCredentials = new BybitCredentials("BybitKey", "BybitSecret");
});

Environment selection can also be configured through GlobalExchangeOptions.ApiEnvironments.

More configuration details are available in the documentation:
https://cryptoexchange.jkorf.dev/crypto-clients/options

Usage patterns

1. Exchange-specific clients

Use the exchange libraries directly when full exchange-specific functionality is needed.

var kucoinClient = new KucoinRestClient();
var binanceClient = new BinanceRestClient();

var binanceTicker = await binanceClient.SpotApi.ExchangeData.GetTickerAsync("ETHUSDT");
var kucoinTicker = await kucoinClient.SpotApi.ExchangeData.GetTickerAsync("ETH-USDT");

2. Exchange clients through the main client

Use ExchangeRestClient or ExchangeSocketClient as a single entry point.

var client = new ExchangeRestClient();

var binanceTicker = await client.Binance.SpotApi.ExchangeData.GetTickerAsync("ETHUSDT");
var kucoinTicker = await client.Kucoin.SpotApi.ExchangeData.GetTickerAsync("ETH-USDT");

3. Shared client interfaces

Use shared interfaces for exchange-agnostic logic.

async Task<ExchangeWebResult<SharedSpotTicker>> GetTickerAsync(ISpotTickerRestClient client, SharedSymbol symbol)
    => await client.GetSpotTickerAsync(new GetTickerRequest(symbol));

var client = new ExchangeRestClient();
var symbol = new SharedSymbol(TradingMode.Spot, "ETH", "USDT");

var binanceResult = await GetTickerAsync(client.Binance.SpotApi.SharedClient, symbol);
var kucoinResult = await GetTickerAsync(client.Kucoin.SpotApi.SharedClient, symbol);

4. Multi-exchange requests

Request the same data from multiple exchanges in one call.

var client = new ExchangeRestClient();
var symbol = new SharedSymbol(TradingMode.Spot, "ETH", "USDT");

var tickers = await client.GetSpotTickerAsync(
    new GetTickerRequest(symbol),
    [Exchange.Binance, Exchange.Kucoin, Exchange.OKX]);

WebSocket subscriptions

The socket client also supports single-exchange and multi-exchange subscriptions.

var socketClient = new ExchangeSocketClient();
var symbol = new SharedSymbol(TradingMode.Spot, "ETH", "USDT");

var subscriptions = await socketClient.SubscribeToTickerUpdatesAsync(
    new SubscribeTickerRequest(symbol),
    data => Console.WriteLine($"{data.Data.Symbol} {data.Data.LastPrice}"),
    [Exchange.Binance, Exchange.OKX]);

Multiple users

Use ExchangeUserClientProvider when working with multiple users and isolated client instances.

var provider = new ExchangeUserClientProvider();
var user1Credentials = new ExchangeCredentials
{
    Binance = new BinanceCredentials("key", "secret")
};
var user2Credentials = new ExchangeCredentials
{
    Binance = new BinanceCredentials("key", "secret")
};

var restClientUser1 = provider.GetRestClient("user-1", user1Credentials);
var restClientUser2 = provider.GetRestClient("user-2", user2Credentials);
var socketClientUser1 = provider.GetSocketClient("user-1");

Supported target frameworks

The package targets:

  • .NET Standard 2.0
  • .NET Standard 2.1
  • .NET 8.0
  • .NET 9.0
  • .NET 10.0

Compatibility includes:

.NET implementation Version support
.NET Core 2.0 and higher
.NET Framework 4.6.1 and higher
Mono 5.4 and higher
Xamarin.iOS 10.14 and higher
Xamarin.Android 8.0 and higher
UWP 10.0.16299 and higher
Unity 2018.1 and higher

Supported exchanges

Centralized exchanges

Binance, BingX, Bitfinex, Bitget, BitMart, BitMEX, Bitstamp, BloFin, Bybit, Coinbase, CoinEx, CoinW, Crypto.com, DeepCoin, GateIo, HTX, Kraken, Kucoin, Mexc, OKX, Toobit, Upbit, Weex, WhiteBit, XT

Decentralized exchanges

Aster, HyperLiquid

Additional platform integrations

CoinGecko, Polymarket

Exchange Type Referral Link Referral Fee Discount
Aster Aster DEX Link 4%
Binance Binance CEX Link 20%
BingX BingX CEX Link 20%
Bitfinex Bitfinex CEX - -
Bitget Bitget CEX Link 20%
BitMart BitMart CEX Link 30%
BitMEX BitMEX CEX Link 30%
Bitstamp Bitstamp CEX - -
BloFin BloFin CEX - -
Bybit Bybit CEX Link -
Coinbase Coinbase CEX Link -
CoinEx CoinEx CEX Link 20%
CoinW CoinW CEX Link -
CoinGecko CoinGecko - - -
Crypto.com Crypto.com CEX Link -
DeepCoin DeepCoin CEX Link -
Gate.io Gate.io CEX Link 20%
HTX HTX CEX Link 30%
HyperLiquid HyperLiquid DEX Link 4%
Kraken Kraken CEX - -
Kucoin Kucoin CEX Link -
Mexc Mexc CEX - -
OKX OKX CEX Link 20%
Toobit Toobit CEX Link -
Upbit Upbit CEX - -
Weex Weex CEX - -
WhiteBit WhiteBit CEX Link -
XT XT CEX Link 25%

Metadata and discovery

Use:

  • Exchanges.All for supported exchanges
  • Platforms.All for supported exchanges and additional platforms

Example API

The following minimal API exposes a cross-exchange ticker endpoint:

using CryptoClients.Net.Interfaces;
using CryptoExchange.Net.Objects;
using CryptoExchange.Net.SharedApis;
using Microsoft.AspNetCore.Mvc;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCryptoClients();

var app = builder.Build();

app.MapGet("Ticker/{exchange}/{baseAsset}/{quoteAsset}",
    async ([FromServices] IExchangeRestClient client, string exchange, string baseAsset, string quoteAsset) =>
    {
        var spotClient = client.GetSpotTickerClient(exchange)!;
        var result = await spotClient.GetSpotTickerAsync(
            new GetTickerRequest(new SharedSymbol(TradingMode.Spot, baseAsset, quoteAsset)));

        return result.Data;
    });

app.Run();

Example requests:

  • GET /Ticker/Kraken/ETH/BTC
  • GET /Ticker/Kucoin/BTC/USDT

Documentation and examples

Support

Discord

Discord

Join the Discord server for questions and discussion:
https://discord.gg/MSpeEtSY8t

Donations

BTC: bc1q277a5n54s2l2mzlu778ef7lpkwhjhyvghuv8qf
ETH: 0xcb1b63aCF9fef2755eBf4a0506250074496Ad5b7
USDT (TRX): TKigKeJPXZYyMVDgMyXxMf17MWYia92Rjd

Sponsorship

https://github.com/sponsors/JKorf

Release notes

  • Version 4.8.1 - 10 Apr 2026

    • Fixed Weex.Net reference version
  • Version 4.8.0 - 10 Apr 2026

    • Updated client library versions
    • Added Weex support with the Weex.Net library
  • Version 4.7.0 - 25 Mar 2026

    • Added CoinGecko to ExchangeRestClient

    • Added coinGeckoRestOptions parameter to ExchangeUserClientProvider constructor

    • Added SetApiCredentials(string, DynamicCredentials) on ExchangeRestClient

    • Added SetApiCredentials(string, DynamicCredentials) on ExchangeSocketClient

    • Split upbitOptions parameter in ExchangeUserClientProvider constructor into upbitRestOptions and upbitSocketOptions

    • Added SetApiCredentials(string, DynamicCredentials) to ExchangeRestClient

    • Added SetApiCredentials(string, DynamicCredentials) to ExchangeSocketClient

    • Marked SetApiCredentials(string exchange, string apiKey, string apiSecret, string? apiPass = null) as obsolete on ExchangeRestClient

    • Marked SetApiCredentials(string exchange, string apiKey, string apiSecret, string? apiPass = null) as obsolete on ExchangeSocketClient

    • Updated ExchangeCredentials to reflect exchange specific ApiCredential types needed in client libraries

    • Removed Dictionary<string, ApiCredentials> constructor overload from ExchangeCredentials

    • Removed Upbit from ExchangeCredentials since authentication is not supported

    • Added ExchangeCredentials.GetDynamicCredentialInfo(TradingMode, string)

    • Added ExchangeCredentials.CreateCredentialsForExchange(string, DynamicCredentials)

    • Added ExchangeCredentials.CreateFrom(Dictionary<string, ApiCredentials>)

    • Added ExchangeCredentials.CreateFrom(string, ApiCredentials)

    • Added DynamicCredentialInfo to ExchangeInfo to retrieve info for an exchange to dynamically create credentials

    • Notes for updating:

      • ExchangeCredentials no longer has a constructor which accepts Dictionary<string, ApiCredentials>. To dynamically create ExchangeCredentials use the ExchangeCredentials.CreateFrom static method in combination with ExchangeCredentials.CreateCredentialsForExchange.
  • Version 4.6.0 - 06 Mar 2026

    • Updated client library versions
    • Added Bitstamp support with the Bitstamp.Net library
  • Version 4.5.0 - 25 Feb 2026

    • Updated client library versions
    • Added PageRequest parameter to endpoints supporting pagination using single exchange parameter
  • Version 4.4.0 - 16 Feb 2026

    • Updated client library versions
  • Version 4.3.0 - 10 Feb 2026

    • Updated client library versions
    • Added user data tracker creation method to (I)ExchangeTrackerFactory
    • Added checks to rest client exchange requests to prevent exception when more than one trading mode specific requests are available for an exchange
    • Added additional methods for requesting supported symbols to Shared ISpotSymbolRestClient/IFuturesSymbolRestClient interfaces
    • Removed UseUpdatedDeserialization option
  • Version 4.2.0 - 22 Jan 2026

    • Updated client library versions
    • Added Polymarket support with the Polymarket.Net library
    • Added static class Platform listing all supported exchange names plus any non-exchange platform names
    • Added static class Platforms listing all supported exchange metadatas plus any non-exchange platform metadata
  • Version 4.1.3 - 19 Jan 2026

    • Updated client library versions, fixing some bugs
  • Version 4.1.2 - 14 Jan 2026

    • Updated client library versions fixing some bugs
  • Version 4.1.1 - 13 Jan 2026

    • Fixed issue with websocket message sequence checking causing reconnects
  • Version 4.1.0 - 13 Jan 2026

    • Updated client library versions
    • Added Create method without exchange parameters to create SymbolOrderBook instance on all supported exchanges
    • Fixed GateIo ExchangeOrderBookFactory Perpetual Futures creation when using SharedSymbol.UsdOrStable
  • Version 4.0.4 - 19 Dec 2025

    • Updated client library versions fixing some bugs
  • Version 4.0.3 - 19 Dec 2025

    • Updated client library versions fixing some bugs
  • Version 4.0.2 - 18 Dec 2025

    • Updated client library versions fixing some bugs
  • Version 4.0.1 - 17 Dec 2025

    • Updated library versions fixing some bugs
  • Version 4.0.0 - 16 Dec 2025

    • Updated client library versions
    • Added Net10.0 target framework
    • Updated CryptoExchange.Net version to 10.0.0, see https://github.com/JKorf/CryptoExchange.Net/releases/ for full release notes
    • Improved performance across the board, biggest gains in websocket message processing
    • Added UseUpdatedDeserialization socket client options to toggle by new and old message handling
    • Updated Shared API's subscription update types from ExchangeEvent to DataEvent
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 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 is compatible.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework 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 tizen40 was computed.  tizen60 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
4.8.1 386 4/10/2026
4.8.0 108 4/10/2026
4.7.0 535 3/25/2026
4.6.0 277 3/6/2026
4.5.0 162 2/25/2026
4.4.0 346 2/16/2026
4.3.0 143 2/10/2026
4.2.0 1,089 1/22/2026
4.1.3 145 1/19/2026
4.1.2 154 1/14/2026
4.1.1 133 1/13/2026
4.1.0 125 1/13/2026
4.0.4 646 12/19/2025
4.0.3 264 12/19/2025
4.0.2 320 12/18/2025
4.0.1 325 12/17/2025
4.0.0 334 12/16/2025
3.16.1 723 12/9/2025
3.16.0 815 11/11/2025
3.15.0 334 11/3/2025
Loading failed