CryptoClients.Net
1.0.0
See the version list below for details.
dotnet add package CryptoClients.Net --version 1.0.0
NuGet\Install-Package CryptoClients.Net -Version 1.0.0
<PackageReference Include="CryptoClients.Net" Version="1.0.0" />
paket add CryptoClients.Net --version 1.0.0
#r "nuget: CryptoClients.Net, 1.0.0"
// Install CryptoClients.Net as a Cake Addin #addin nuget:?package=CryptoClients.Net&version=1.0.0 // Install CryptoClients.Net as a Cake Tool #tool nuget:?package=CryptoClients.Net&version=1.0.0
CryptoClients.Net
CryptoClients.Net is a collection of different cryptocurrency exchange client libraries based on the same base library. CryptoClients.Net bundles the different client libraries in a single package and adds some additional tools to make use of them. The client libraries offer access to market data, Spot and Futures trading and various other topics depending on the API.
For more information on what CryptoExchange.Net and it's client libraries offers see the Documentation.
Supported Frameworks
The library is targeting both .NET Standard 2.0
and .NET Standard 2.1
for optimal compatibility
.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 |
Get the library
dotnet add package CryptoClients.Net
How to use
Get a client
There are 2 main clients, the ExchangeRestClient
and ExchangeSocketClient
, for accessing the REST and Websocket API respectively. All exchange API's are available via these clients.
Alternatively exchange specific clients can be used, for example BinanceRestClient
or KucoinSocketClient
.
Either create new clients directly or use Dotnet dependency injection:
// Construction
var restClient = new ExchangeRestClient();
var socketClient = new ExchangeSocketClient();
// Dependency injection, allows the injection of `IExchangeRestClient`, `IExchangeSocketClient`, `IExchangeOrderBookFactory` and for all exchanges the `I[ExchangeName]RestClient`, `I[ExchangeName]SocketClient` and `I[ExchangeName]OrderBookFactory` types
services.AddCryptoClients();
Using the client
There are multiple options for accessing exchange API's. Options 1 and 2 allow access to the full exchange API while option 3 uses a common interface which allows exchange agnostic requesting, but is therefor limited in functionality.
Option 3 is currently only supported for the Spot REST API's.
// Option 1
// Use exchange clients directly, full functionality
var kucoinClient1 = new KucoinRestClient();
var binanceClient1 = new BinanceRestClient();
var binanceResult1 = await binanceClient1.SpotApi.ExchangeData.GetTickerAsync("ETHUSDT");
var kucoinResult1 = await kucoinClient1.SpotApi.ExchangeData.GetTickerAsync("ETH-USDT");
// Option 2
// Use exchange client via ExchangeRestClient, full functionality
var restClient2 = new ExchangeRestClient();
var baseAsset2 = "ETH";
var quoteAsset2 = "USDT";
var binanceResult2 = await restClient2.Binance.SpotApi.ExchangeData.GetTickerAsync(restClient2.Binance.SpotApi.FormatSymbol(baseAsset2, quoteAsset2));
var kucoinResult2 = await restClient2.Kucoin.SpotApi.ExchangeData.GetTickerAsync(restClient2.Kucoin.SpotApi.FormatSymbol(baseAsset2, quoteAsset2));
// Option 3
// Use unified spot client via GetUnifiedSpotClient, most generic but only supports common functionality
var restClient3 = new ExchangeRestClient();
var baseAsset3 = "ETH";
var quoteAsset3 = "USDT";
var unifiedBinanceClient3 = restClient3.GetUnifiedSpotClient(Exchange.Binance);
var unifiedKucoinClient3 = restClient3.GetUnifiedSpotClient(Exchange.Kucoin);
var binanceResult3 = await unifiedBinanceClient3.GetTickerAsync(unifiedBinanceClient3.GetSymbolName(baseAsset3, quoteAsset3));
var kucoinResult3 = await unifiedKucoinClient3.GetTickerAsync(unifiedKucoinClient3.GetSymbolName(baseAsset3, quoteAsset3));
For information on the specific exchange clients, dependency injection, response processing and more see the CryptoExchange.Net documentation or have a look at the examples here. See the CryptoExchange.Net examples for client examples which also apply to CryptClients.Net
Supported Exchanges
The following API's are included in CryptoClients.Net:
Exchange | Repository | Nuget |
---|---|---|
Binance | JKorf/Binance.Net | |
BingX | JKorf/BingX.Net | |
Bitfinex | JKorf/Bitfinex.Net | |
Bitget | JKorf/Bitget.Net | |
Bybit | JKorf/Bybit.Net | |
CoinEx | JKorf/CoinEx.Net | |
CoinGecko | JKorf/CoinGecko.Net | |
Huobi/HTX | JKorf/Huobi.Net | |
Kraken | JKorf/Kraken.Net | |
Kucoin | JKorf/Kucoin.Net | |
Mexc | JKorf/Mexc.Net | |
OKX | JKorf/OKX.Net |
Discord
A Discord server is available here. Feel free to join for discussion and/or questions around the CryptoExchange.Net and implementation libraries.
Support the project
I develop and maintain this package on my own for free in my spare time, any support is greatly appreciated.
Donate
Make a one time donation in a crypto currency of your choice. If you prefer to donate a currency not listed here please contact me.
Btc: bc1q277a5n54s2l2mzlu778ef7lpkwhjhyvghuv8qf
Eth: 0xcb1b63aCF9fef2755eBf4a0506250074496Ad5b7
USDT (TRX) TKigKeJPXZYyMVDgMyXxMf17MWYia92Rjd
Sponsor
Alternatively, sponsor me on Github using Github Sponsors.
Release notes
Product | Versions 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 | 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. |
-
.NETStandard 2.0
- Binance.Net (>= 9.9.4)
- Bitfinex.Net (>= 7.2.6)
- Bybit.Net (>= 3.8.5)
- CoinEx.Net (>= 7.0.3)
- CoinGecko.Net (>= 2.2.5)
- Huobi.Net (>= 5.2.6)
- JK.BingX.Net (>= 1.0.4)
- JK.Bitget.Net (>= 1.3.5)
- JK.Mexc.Net (>= 1.2.2)
- JK.OKX.Net (>= 1.8.2)
- KrakenExchange.Net (>= 4.6.2)
- Kucoin.Net (>= 5.5.1)
-
.NETStandard 2.1
- Binance.Net (>= 9.9.4)
- Bitfinex.Net (>= 7.2.6)
- Bybit.Net (>= 3.8.5)
- CoinEx.Net (>= 7.0.3)
- CoinGecko.Net (>= 2.2.5)
- Huobi.Net (>= 5.2.6)
- JK.BingX.Net (>= 1.0.4)
- JK.Bitget.Net (>= 1.3.5)
- JK.Mexc.Net (>= 1.2.2)
- JK.OKX.Net (>= 1.8.2)
- KrakenExchange.Net (>= 4.6.2)
- Kucoin.Net (>= 5.5.1)
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.4.0 | 93 | 10/28/2024 |
2.3.0 | 103 | 10/23/2024 |
2.2.1 | 123 | 10/14/2024 |
2.2.0 | 74 | 10/14/2024 |
2.1.0 | 128 | 10/8/2024 |
2.0.0 | 217 | 9/27/2024 |
1.11.0 | 197 | 8/19/2024 |
1.10.0 | 184 | 8/9/2024 |
1.9.0 | 92 | 8/2/2024 |
1.8.0 | 77 | 7/29/2024 |
1.6.0 | 337 | 7/3/2024 |
1.5.0 | 120 | 6/25/2024 |
1.3.1 | 150 | 6/17/2024 |
1.3.0 | 112 | 6/12/2024 |
1.2.0 | 173 | 6/2/2024 |
1.1.0 | 239 | 5/7/2024 |
1.0.0 | 180 | 4/28/2024 |