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.
- Direct full access to 13 different exchanges, public and private data
- Client per exchange, or single client for accessing all exchanges
- Response data is mapped to descriptive models
- Input parameters and response values are mapped to discriptive enum values where possible
- Automatic websocket (re)connection management
- Client side rate limiting
- Client side order book implementation
- Extensive logging
- Support for different environments
For more information on what CryptoExchange.Net and its client libraries offers see the Documentation.
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 |
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 | |
BitMart | JKorf/BitMart.Net | |
Bybit | JKorf/Bybit.Net | |
CoinEx | JKorf/CoinEx.Net | |
CoinGecko | JKorf/CoinGecko.Net | |
Gate.io | JKorf/GateIo.Net | |
HTX | JKorf/HTX.Net | |
Kraken | JKorf/Kraken.Net | |
Kucoin | JKorf/Kucoin.Net | |
Mexc | JKorf/Mexc.Net | |
OKX | JKorf/OKX.Net |
dotnet add package CryptoClients.Net
CryptoClients.Net is available on GitHub packages. You'll need to add https://nuget.pkg.github.com/JKorf/index.json
as a NuGet package source.
The NuGet package files are added along side the source with the latest GitHub release which can found here.
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
// Client for accessing all exchanges
IExchangeRestClient restClient = new ExchangeRestClient();
IExchangeSocketClient socketClient = new ExchangeSocketClient();
// Exchange specific clients
IBinanceRestClient binanceRestClient = new BinanceRestClient();
IKucoinSocketClient kucoinSocketClient = new KucoinSocketClient();
Dependency injection
// Dependency injection, allows the injection of `IExchangeRestClient`, `IExchangeSocketClient` and `IExchangeOrderBookFactory` interfaces
// as well as for all exchanges the `I[ExchangeName]RestClient`, `I[ExchangeName]SocketClient` and `I[ExchangeName]OrderBookFactory` types
services.AddCryptoClients();
Clients can be configured when doing the dependency injection registration, or when constructing the clients. Configuration can be done for all exchanges/clients, can be set per exchange or a combination:
builder.Services.AddCryptoClients(globalOptions =>
{
// Global options apply to each exchange/client
globalOptions.OutputOriginalData = true;
// Set credentials for the different exchanges, will be applied to both REST and socket clients
globalOptions.ApiCredentials = new CryptoClients.Net.Models.ExchangeCredentials
{
Binance = new ApiCredentials("BinanceKey", "BinanceSecret"),
Kucoin = new KucoinApiCredentials("KucoinKey", "KucoinSecret", "KucoinPassphrase"),
OKX = new OKXApiCredentials("OKXKey", "OKXSecret", "OKXPassphrase")
};
},
bybitRestOptions: bybitOptions =>
{
// Specify options specifically for a specific exchange and client, in this case the Bybit REST client
bybitOptions.Environment = Bybit.Net.BybitEnvironment.Netherlands;
bybitOptions.ApiCredentials = new ApiCredentials("BybitKey", "BybitSecret");
});
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
An API allowing the requesting of any ticker on any (supported) exchange in 13 lines;
For example GET /Ticker/Kraken/ETH/BTC
or GET /Ticker/Kucoin/BTC/USDT
using CryptoExchange.Net.Interfaces;
using CryptoClients.Net.Enums;
using CryptoClients.Net.Interfaces;
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, Exchange exchange, string baseAsset, string quoteAsset) =>
{
var spotClient = client.GetUnifiedSpotClient(exchange)!;
var result = await spotClient.GetTickerAsync(spotClient.GetSymbolName(baseAsset, quoteAsset));
return result.Data;
});
app.Run();
A Discord server is available here. Feel free to join for discussion and/or questions around the CryptoExchange.Net and implementation libraries.
I develop and maintain this package on my own for free in my spare time, any support is greatly appreciated.
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
Alternatively, sponsor me on Github using Github Sponsors.
-
Version 1.11.0 - 19 Aug 2024
- Updated Binance.Net to version 10.2.1
- Fixed walletType serialization on SpotApi.Trading.ConvertQuoteRequestAsync endpoint
- Re-added the UsdFuturesApi.Account.GetAccountInfoV2Async endpoint as the V3 endpoint is missing data
- Renamend UsdFuturesApi.Account.GetAccountInfoAsync to GetAccountInfoV3Async
- Fixed SpotApi.ExchangeData.GetProductsAsync deserialization
- Updated BingX.Net to version 1.9.0
- Added PerpetualFuturesApi.Trading.GetPositionHistoryAsync endpoint
- Updated PerpetualFuturesApi.Account.GetBalancesAsync to V3, returning both USDT and USDC balances
- Added sync parameter to SpotApi.Trading.PlaceMultipleOrderAsync endpoint
- Updated Bitget.Net to 1.9.1
- Added PositionId to FuturesApiV2.Trading.GetPositionHistoryAsync response model
- Updated some endpoint ratelimits
- Updated Bybit.Net to version 3.13.1
- Added addOrReduce parameter to V5Api.Account.RequestDemoFundsAsync endpoint
- Added referer to V5Api.Account.GetConvertQuoteAsync endpoint
- Updated CoinEx.Net to version 7.6.0
- Added futures API batch endpoints:FuturesApi.Trading.PlaceMultipleOrdersAsync, PlaceMultipleStopOrdersAsync, CancelOrdersAsync and CancelStopOrdersAsync
- Added spot API batch endpoints: SpotApiV2.Trading.PlaceMultipleOrdersAsync, PlaceMultipleStopOrdersAsync, CancelOrdersAsync and CancelStopOrdersAsync
- Added stpMode parameters to spot and futures PlaceOrderAsync and PlaceStopOrderAsync endpoints
- Updated HTX.Net to version 6.0.2
- Fix deserialization undocumented canceled-source field value
- Fixed websocket SpotApi queries (GetXX methods)
- Updated Kucoin.Net to version 5.12.0
- Added FuturesApi.SubscribeToKlineUpdatesAsync subscription
- Added FuturesApi.ExchangeData.GetTickersAsync endpoint
- Added FuturesApi.Trading.GetMaxOpenPositionSizeAsync endpoint
- Added migration endpoints SpotApi.Account.GetHfMigrationStatusAsync and MigrateHfAccountAsync
- Updated Binance.Net to version 10.2.1
-
Version 1.10.0 - 09 Aug 2024
- Updated reference CryptoExchange version to 7.11.0
- Added ParseString static method on EnumConverter for parsing strings manually
- Added support for decimal values in System.Text.Json NumberStringConverter
- Added support for
null
string values in System.Text.Json DecimalConverter - Added support for number deserialization when requesting string in System.Text.Json MessageAccessor.GetValue
- Added deserialization handling of json values too big to fit decimal value
- Decreased some memory allocations during rest request authentication
- Fixed subscriptions trying to send unsubscribe request when the socket connection will be closed anyway
- Removed SecureString usage in credentials; it's not recommended to be used
- Removed some extension methods no longer relevant
- Improved testing checks
- Updated Binance.Net to version 10.1.1
- Updated XML code comments
- Fixed BinanceFuturesAccountAsset MaintMargin deserialization
- Fixed BinancePosition MaintMargin deserialization
- Fixed BinancePosition UnrealizedProfit deserialization for Coin-M futures
- Updated BingX.Net to version 1.8.0
- Updated XML code comments
- Fixed PerpetualFuturesApi.Account.SetMarginModeAsync endpoint
- Updated Bitfinex.Net to version 7.7.0
- Updated XML code comments
- Fixed BitfinexPosition model Type enum being nullable
- Updated Bitget.Net to version 1.9.0
- Updated XML code comments
- Fixed order status and order type deserialization futures models
- Updated BitMart.Net to version 1.1.1
- Updated XML code comments
- Added SpotApi.Trading.CancelAllOrdersAsync endpoint
- Fixed SpotApi.GetSymbolName not being implemented
- Updated Bybit.Net to version 3.13.0
- Updated XML code comments
- Added IsMaker to socketClient.V5Api.SubscribeToMinimalUserTradeUpdatesAsync update model
- Updated CoinEx.Net to version 7.5.0
- Updated XML code comments
- Added deprecation notice to V1 Spot API
- Updated CoinGecko.Net to version 2.5.0
- Updated GateIo.Net to version 1.5.0
- Updated XML code comments
- Removed Huobi.Net
- Added HTX.Net, the Huobi.Net package renamed and fully updated
- Renamed library from Huobi.Net to HTX.Net, following the renaming of the exchange
- Renamed all models and references from Huobi... to HTX...
- Renamed UsdtMarginSwapApi to UsdtFuturesApi
- Renamed some endpoints to match standardized endpoint names
- Split Margin and SubAccount endpoints into separate topics in the rest SpotApi
- Split SubAccount endpoints into separate topics in the rest FuturesApi
- Added UsdtFuturesSymbolOrderBook implementation
- Added client side ratelimiting
- Added various missing endpoints
- Added Usdt Futures API account websocket streams
- Updated from Newtonsoft.Json to System.Text.Json for json handling
- Updated code xml comments
- Updated API documentation references
- Fixed a large number of bugs
- Updated Kraken.Net to version 4.11.0
- Updated XML code comments
- Updated Kucoin.Net to version 5.11.0
- Updated XML code comments
- Add caching for passphrase authentication sign
- Renamed SpotApi.SubscribeToBestOfferUpdatesAsync to SubscribeToBookTickerUpdatesAsync
- Fixed KucoinOrder and KucoinUserTrade model Stop property being nullable Enum
- Updated Mexc.Net to version 1.7.2
- Updated XML code comments
- Fixed deserialization errors due to too large numbers
- Updated OKX.Net to version 2.3.0
- Updated CryptoExchange.Net to version 7.11.0, see https://github.com/JKorf/CryptoExchange.Net/releases/tag/7.11.0
- Updated XML code comments
- Added UnifiedApi.Trading.CheckOrderAsync endpoint
- Added PositionSide property to UnifiedApi.Account.GetPositionHistoryAsync response model
- Updated property nullability for OKXInterestAccrued.MarginMode and OKXAlgoOrder.PositionSide properties
- Updated reference CryptoExchange version to 7.11.0
-
Version 1.9.0 - 02 Aug 2024
- Added BitMart.Net support
-
Version 1.8.0 - 28 Jul 2024
- Updated CryptoExchange.Net referenced version to 7.10.0
- Added System.Text.Json NumberStringConverter
- Added integration testing base class
- Added AddSecondsString and AddOptionalSecondsString to ParameterCollection
- Added Decompress method for ReadOnlyMemory using non-GZip deflate
- Added SocketConnection parameter to SocketConnection PreprocessStreamMessage
- Fixed websocket reconnect/unsubscribe timing bug
- Fixed issue in System.Text.Json array object deserialization skipping property when skipping an index
- Fixed order book logging bug
- Fixed bug in ParameterCollection AddEnumAsInt
- Updated Binance to version 10.0.0
- Switch from Newtonsoft.Json implementation to System.Text.Json for (de)serialization
- Refactored from old per type enum converter to EnumConverter usage
- Added SpotApi.Account.GetCommissionRatesAsync endpoint
- Added UsdFuturesApi.Account.GetSymbolConfigurationAsync endpoint
- Added UsdFuturesApi.Account.GetAccountConfigurationAsync endpoint
- Added UsdFuturesApi.Trading.GetPositionsAsync endpoint
- Added PermissionSets property to SpotApi.ExchangeData.GetExchangeInfoAsync symbol response
- Updated UsdFuturesApi.Account.GetBalancesAsync to V3
- Updated UsdFuturesApi.Account.GetAccountInfoAsync to V3
- Updated BingX to version 1.7.0**
- Updated Bitfinex to version 7.6.0**
- Fixed stats endpoints last stats by splitting endpoints into Last and History variants
- Updated Bitget to version 1.8.0**
- Fixed body serialization FuturesV2, fixing PlaceMultipleOrders and CancelMultipleOrdersAsync endpoints
- Fixed futures plan type parameters
- Fixed spot GetHistoricalKlinesAsync endTime parameter being required
- Fixed BitgetFuturesOrder response mapping
- Updated Bybit to version 3.12.0**
- Added V5Api.Account.GetSpotMarginInterestRateHistoryAsync endpoint
- Updated CoinEx to version 7.4.0**
- Updated CoinGecko to version 2.4.0**
- Updated GateIo to version 1.4.0**
- Fixed FuturesApi.Trading.GetOrdersAsync status parameter being required
- Updated Huobi to version 5.6.0**
- Updated Kraken to version 4.10.0**
- Updated Kucoin to version 5.10.0**
- Added SpotApi.Margin.GetMarginMarkPricesAsync endpoint
- Updated KC-API-KEY-VERSION header from '2' to '3' (V2 keys will still work)
- Updated Mexc to version 1.6.0**
- Updated OKX to version 2.2.0**
- Added RuleType property on UnifiedApi.ExchangeData.GetSymbolsAsync response model
- Fixed marginMode serialization in multiple endpoints
- Updated CryptoExchange.Net referenced version to 7.10.0
-
Version 1.7.0 - 16 Jul 2024
- Updated CryptoExchange.Net referenced version to 7.9.0
- Added some checks in websocket connection handling
- Added As and AsError methods on untyped WebCallResult
- Updated System.Text.Json package to version 8.0.4 to fix vulnerability
- Updated websocket subscription response handling to remove the thread blocking ManualResetEvent usage
- Updated static logging classes access modifier from internal to public so they can be called in overriden methods
- Updated some testing object implementations
- Fixed authentication error when reconnecting an unauthenticated connection which was marked as dedicated query connection
- Small improvements in SystemTextJsonMessageAccessor
- Fixed System.Text.Json ArrayConverter implementation nullable value types handling
- Updated Binance.Net to version 9.12.0
- Updated internal classes to internal access modifier
- Updated WebSocket rate limit rule to prevent triggering disconnect
- Updated Bybit.Net to version 3.11.0
- Updated internal classes to internal access modifier
- Added V5Api.Account.GetConvertAssetsAsync
- Added V5Api.Account.GetConvertQuoteAsync
- Added V5Api.Account.ConvertConfirmQuoteAsync
- Added V5Api.Account.GetConvertStatusAsync
- Added V5Api.Account.GetConvertHistoryAsync
- Added Convert property to V5Api.Account.GetBrokerAccountInfoAsync and GetBrokerEarningsAsync response models
- Updated CoinEx.Net to version 7.3.0
- Updated internal classes to internal access modifier
- Added SpotApiV2.ExchangeData.GetAssetsAsync endpoint
- Updated CoinGecko.Net to version 2.3.0
- Updated GateIo.Net to version 1.3.0
- Updated internal classes to internal access modifier
- Added BorrowType property to SpotApi.Account.GetUnifiedAccountLoanHistoryAsync response model
- Added AccumelatedSize to FuturesApi.Trading.GetPositionCloseHistoryAsync response model
- Updated Huobi.Net to version 5.5.0
- Updated internal classes to internal access modifier
- Updated BingX.Net to version 1.6.0
- Updated internal classes to internal access modifier
- Added PerpetualFuturesApi.ExchangeData.GetTickersAsync endpoint
- Added PerpetualFuturesApi.ExchangeData.GetLastTradePricesAsync endpoint
- Added PerpetualFuturesApi.ExchangeData.GetFundingRatesAsync endpoint
- Added SpotApi.ExchangeData.GetLastTradesAsync endpoint
- Added SpotApi.Account.GetUserIdAsync endpoint
- Added SpotApi.Account.GetApiKeyPermissionsAsync endpoint
- Added sync parameter to SpotApi.Trading.PlaceMultipleOrdersAsync
- Updated API endpoint docs references
- Fixed Spot and Futures KeepAliveUserStreamAsync endpoint
- Fixed clientOrderId deserialization in websocket order updates
- Updated Bitget.Net to version 1.7.0
- Updated internal classes to internal access modifier
- Fixed deserialization error on BitgetPosition model
- Fixed positionSide parameter on FuturesApiV2.Trading.PlaceOrderAsync endpoint
- Fixed websocket error response identification
- Fixed CreateTime and UpdateTime deserialization on FuturesApiV2.Trading.GetPositionHistoryAsync
- Updated Mexc.Net to version 1.5.0
- Updated internal classes to internal access modifier
- Fixed StartTime and EndTime mapping on MexcStreamKline model
- Updated OKX.Net to version 2.1.0
- Fixed error during parsing of error response
- Fixed exception during CancelOrderAsync error response
- Updated internal classes to internal access modifier
- Updated Kraken.Net to version 4.9.0
- Updated Kucoin.Net to version 5.9.0
- Updated internal classes to internal access modifier
- Updated CryptoExchange.Net referenced version to 7.9.0
-
Version 1.6.0 - 03 Jul 2024
- Updated CryptoExchange.Net referenced version to 7.8.0
- Updated single endpoint limit configuration
- Added LongConverter for nullable longs
- Updated SystemTextJsonComparer logic
- Fixed request ids not matching in logging
- Added nullable int converter for System.Text.Json
- Small fixes in tests
- Updated Binance to 9.11.1
- Updated ratelimiting for per-endpoint limits
- Updated BingX to 1.5.0
- Added TakeProfit/StopLoss parameters to perpetual futures order endpoints
- Added rate limiting ratelimiting implementation
- Updated BingXPosition model
- Updated Bitfinex to 7.4.3
- Fixed SpotApi.Account.GetMovementsDetailsAsync deserialization
- Fixed SpotApi.SubscribeToDerivativesUpdatesAsync subscription
- Fixed funding info subscription
- Updated Bitget to 1.6.1
- Updated ratelimiting for per-endpoint limits
- Fixed V1 socket subscriptions
- Fixed FuturesApiV2.Trading.GetOpenOrdersAsync deserialization
- Updated V2 websocket kline interval Enum values
- Updated Bybit to 3.10.3
- Added Turkey environment
- Added prelisting properties to V5 linear/inverse tickers and symbols response models
- Fixed OrderBook model deserialization when updateId is too large for integer
- Updated CoinEx to 7.2.1
- Added FuturesApi.ExchangeData.GetPremiumIndexPriceHistoryAsync endpoint
- Updated CoinGecko to 2.2.10
- Updated GateIo to 1.2.1
- Updated ratelimiting for per-endpoint limits
- Updated Huobi to 5.4.1
- Updated Kraken to 4.8.1
- Updated KrakenAllocatedAmount model
- Updated Kucoin to 5.8.3
- Fixed incorrect response mapping SpotApi.HfTrading.PlaceMultipleOrdersAsync
- Fixed CancelAfter parameter on SpotApi.HfTrading.PlaceMultipleOrdersAsync endpoint
- Removed symbol base parameter from SpotApi.HfTrading.PlaceMultipleOrdersAsync as its not needed
- Updated Mexc to 1.4.1
- Updated OKX to 2.0.0
- Added client side rate limiting
- Added Trading.CancelAllAfterAsync endpoint
- Updated json serializer from Newtonsoft.Json to System.Text.Json
- Updated request sending to new CryptoExchange.Net implementation
- Updated all enum conversions to use new EnumConverter
- Updated websocket kline subscriptions models to IEnumerable
- Updated AccountBillSubType enum values
- Updated AccountBillType enum values
- Updated FundingBillType enum values
- Updated InstrumentAlias enum values
- Updated various response models
- Updated response checking from every endpoint to central method
- Renamed all enums, OKX prefix removed. For example OKXOrderSide is now OrderSide
- Renamed OrderType.MarketOrder to OrderType.Market
- Renamed OrderType.LimitOrder to OrderType.Limit
- Renamed Candlestick references to Kline
- Renamed OKXPeriod to KlineInterval
- Renamed Account.GetAccountPositionsAsync to GetPositionsAsync
- Renamed Account.GetAccountPositionHistoryAsync to GetPositionHistoryAsync
- Renamed Account.GetAccountPositionRiskAsync to GetPositionRiskAsync
- Renamed Account.SetAccountPositionModeAsync to SetPositionModeAsync
- Renamed Account.GetAccountLeverageAsync to GetLeverageAsync
- Renamed Account.SetAccountLeverageAsync to SetLeverageAsync
- Renamed Account.GetLightningWithdrawalsAsync to GetLightningWithdrawalAsync
- Renamed ExchangeData.GetRubik* to GetTradeStats*
- Cleanup unnused types
- Updated CryptoExchange.Net referenced version to 7.8.0
-
Version 1.5.0 - 25 Jun 2024
-
Updated CryptoExchange.Net referenced version to 7.7.2
- Caching support
- Caching is supported for GET requests within a certain time frame
- Enable caching by setting CachingEnabled to true in the client options
- Added DataSource to CallResult object
- Dedicated websocket connection
- Added functionality for always having a connection open which can then be used for order operations
- This eliminates the initial connection time for the first request
- WebSocket connection can be prepared by calling PrepareConnectionsAsync on the Api client, for example
await binanceSocketClient.SpotApi.PrepareConnectionsAsync()
. This is only needed initially; it will be reconnected when connection is lost.
- Added CancellationToken support for websocket queries
- Added SocketConnection parameter to SocketApiClient.GetAuthenticationRequest method
- Added ObjectStringConverter base converter for deserializing nested json strings
- Fixed websocket issue with ratelimiting and reconnecting interaction
- Fixed rate limiting issue with sub-millisecond delays
- Fixed websocket connection will now close if authentication fails because of not set credentials
- Fixed ratelimiting issue possibly creating negative delays
- Updated websocket reconnection handling and options, added backoff policy
- Removed check for confirmed subscription as data often is pushed before the subscription is confirmed
- Caching support
-
Updated Binance to 9.11.0
- Added dedicated connection configuration; a websocket connection can now be established before making the first request by calling
binanceSocketClient.SpotApi.PrepareConnectionsAsync();
- Added CancellationToken optional parameter to websocket requests
- Updated response models from classes to records
- Added dedicated connection configuration; a websocket connection can now be established before making the first request by calling
-
Updated BingX to 1.3.2
-
Updated Bitfinex to 7.4.1
- Updated response models from classes to records
- Fixed exception during order status parsing
- Fixed SpotApi.ExchangeData.GetLiquidationsAsync deserializations
-
Updated Bitget to 1.5.1
- Added V2 SpotApi and V2 Futures API implementation
-
Updated Bybit to 3.10.1
- Added V5 websocket order placement API
- Updated response models from classes to records
- Added and updated DCP endpoints end subscription
- Added dedicated connection configuration; a websocket connection can now be established before making the first request by calling
bybitSocketClient.V5PrivateApi.PrepareConnectionsAsync();
- Fixed deserialization issue BybitPosition model
-
Updated CoinEx to 7.2.0
- Updated response models from classes to records
-
Updated CoinGecko to 2.2.9
-
Updated GateIo to 1.2.0
- Added dedicated connection configuration; a websocket connection can now be established before making the first request by calling
gateIoSocketClient.SpotApi.PrepareConnectionsAsync();
- Added SpotApi.Account.GetGTDeductionStatusAsync endpoint
- Added SpotApi.Account.SetGTDeductionStatusAsync endpoint
- Added dedicated connection configuration; a websocket connection can now be established before making the first request by calling
-
Updated Huobi to 5.4.0
- Updated response models from classes to records
-
Updated Kraken to 4.8.0
- Updated response models from classes to records
- Added CancellationToken optional parameter to websocket requests
-
Updated Kucoin to 5.8.0
- Added missing HF/ProAccount endpoints
- Renamed ProAccount SpotApi topic to HFTrading
- Added FuturesApi.Account.GetPositionHistoryAsync endpoint Added FuturesApi.Account.GetTradingFeeAsync endpoint
- Added SpotApi.SubscribeToIsolatedMarginPositionUpdatesAsync subscription
- Added SpotApi.Margin.GetCrossMarginSymbolsAsync endpoint
- Added SpotApi.Margin.SetLeverageMultiplierAsync
- Added SpotApi.HfTrading.GetMarginSymbolsWithOpenOrdersAsync endpoint
- Updated response models from classes to records
-
Updated Mexc to 1.4.0
- Added websocket connection ratelimit
- Updated SpotApi.Account.WithdrawAsync parameters and SpotApi.Account.GetUserAssetsAsync response
- Updated response models from classes to records
-
Updated OKX to 1.11.1
- Added CancellationToken optional parameter to websocket requests
- Added dedicated connection configuration; a websocket connection can now be established before making the first request by calling
okxSocketClient.UnifiedApi.PrepareConnectionsAsync();
- Fixed deserialization issue in OkxTicker
- Fixed deserialization issue in SetLeverage
-
-
Version 1.3.1 - 17 Jun 2024
- Updated GateIo to 1.0.1
- Fixed startTime/endTime filtering on multiple endpoints
- Updated BingX to 1.3.1
- Fixed bingXClient.PerpetualFuturesApi.ExchangeData.GetContractsAsync response parsing by updating Status mapping
- Updated OKX to 1.10.1
- Fixed deserialization issue in market sell websocket order updates
- Updated GateIo to 1.0.1
-
Version 1.3.0 - 12 Jun 2024
- Added Gate.io implementation
- Updated CryptoExchange.Net referenced version to 7.6.0
- Added support for specifying seperate uri and body parameters
- Added support for different message and handling generic types on socket queries
- Added support for PATCH http method requests
- Added support for setting http request body to a specific type directly
- Split DataEvent.Topic into StreamId and Symbol properties
- Added support for negative time values parsing
- Added some helper methods for converting DataEvent to CallResult
- Added support for GZip/Deflate automatic decompressing in the default HttpClient
- Updated some testing methods
- Updated Binance to 9.10.0
- Added new SpotApi.Trading.PlaceOtoOrderListAsync and SpotApi.Trading.PlaceOtocoOrderListAsync endpoints
- Fixed GetProductsAsync endpoints by allowing automatic decompression
- Updated Bitfinex to 7.3.0
- Updated BingX to 1.3.0
- Updated Bitget to 1.4.0
- Updated Bybit to 3.9.0
- Added socketClient.V5PrivateApi.SubscribeToMinimalUserTradeUpdatesAsync private subscription
- Updated CoinEx to 7.1.0
- Updated CoinGecko to 2.2.8
- Updated Huobi to 5.3.0
- Updated Kraken to 4.7.0
- Fix Asset not set on response model in SpotApi.Account.GetAvailableBalancesAsync
- Updated Kucoin to 5.6.0
- Updated OKX to 1.10.0
-
Version 1.2.0 - 02 Jun 2024
- Added missing Huobi API to IExchangeRestClient interface
- Updated Binance to 9.9.8
- Added SpotApi.Account.GetAccountVipLevelAndStatusAsync endpoint
- Added UsdFuturesApi.Account.GetBnbBurnStatusAsync and UsdFuturesApi.Account.SetBnbBurnStatusAsync endpoints
- Added missing GoodTillDate TimeInForce conversion
- Updated BingX to 1.2.0
- Added PerpetualFuturesApi.SubscribeToPartialOrderBookUpdatesAsync, PerpetualFuturesApi.SubscribeToKlineUpdatesAsync and PerpetualFuturesApi.SubscribeToTickerUpdatesAsync subscriptions for all symbols
- Added PerpetualFuturesApi.Trading.GetPositionAndMarginInfoAsync endpoint
- Added optional symbol parameter PerpetualFuturesApi.ExchangeData.GetContractsAsync
- Updated BingXWithdrawal response model
- Updated BingXPosition response model
- Updated Bitget to 1.3.8
- Added simulated product types to BitgetInstrumentType enum
- Updated Bybit to 3.8.9
- Added missing StopLossTakeProfitMode enum value
- Added Status property to V5Api.Account.CreateUniversalTransfer response model
- Added cursor parameter to V5Api.ExchangeData.GetRiskLimitAsync
- Updated Kraken to 4.6.6
- Added margin parameter to websocket SpotApi.PlaceOrderAsync
- Added countryCode parameter to SpotApi.ExchangeData.GetSymbolsAsync
- Updated Mexc to 1.2.5
- Added SpotApi.Account.GetTradeFeeAsync endpoint
- Updated OKX to 1.9.0
- Added UnifiedApi.Account.GetAssetValuationAsync endpoint
- Renamed BestAskSize to BestAskQuantity in OKXTicker model
- Fixed OKXSocketOptions not using OKXApiCredentials
-
Version 1.1.0
- Added support for GlobalExchangeOptions when constructing clients without dependency injection
- Updated CryptoExchange.Net to 7.5.2
- Added testing implementations
- Small refactor AuthenticationProvider to allow better testing
- Change result of MessageAccessor.Read methods to CallResult so error can be returned
- Moved some DateTimeConverter logic to seperate methods to allow access from outside converters
- Fixed SetApiCredentials not correctly being used by rate limiter causing exception
- Updated Binance to 9.9.7
- Updated multiple response models
- Fixed multiple bugs after new, more thorough unit testing implementation
- Removed duplicate SpotApi.Trading.ConvertTransferAsync and GetConvertTransferHistoryAsync endpoints
- Updated CoinFuturesApi.Account.GetBracketsAsync to V2 endpoint
- Updated CoinFuturesApi.Trading.PlaceMultipleOrdersAsync orders parameter from array to IEnumerable
- Updated BingX to 1.1.1
- Removed need for API credentials in certain ExchangeData calls
- Renamed PerpetualFutures.Trading.GetClosedOrderAsync to GetClosedOrdersAsync
- Changed PerpetualFutures.SubscribeToUserDataUpdatesAsync handlers to be nullable
- Fixed SpotApi.SubscribeToBalanceUpdatesAsync update handling
- Various small fixes
- Updated Bitfinex to 7.2.8
- Updated Bitget to 1.3.7
- Updated Bybit to 3.8.8
- Split PurchaseLeverageTokenAsync and RedeemLeverageTokenAsync response models
- Updated various response models
- Fixed PurchaseLeverageTokenAsync, RedeemLeverageTokenAsync and GetLeverageTokenOrderHistoryAsync request path
- Updated CoinEx to 7.0.5
- Updated CoinGecko to 2.2.7
- Updated Huobi to 5.2.8
- Updated Kraken to 4.6.5
- Updated various models
- Fixed deserialization issue in SpotApi.ExchangeData.GetSymbolsAsync endpoint
- Updated Kucoin to 5.5.5
- Added SpotApi.Trading.GetOcoOrderByClientOrderIdAsync to interface
- Fixed universal transfer endpoint
- Fixed FuturesApi.SubscribeToStopOrderUpdatesAsync deserialization
- Updated various response models
- Updated Mexc to 1.2.4
- Updated OKX to 1.8.4
-
Version 1.0.0 - 28 Apr 2024
- Initial version