Home

Awesome

.HTX.Net HTX.Net

.NET License

HTX.Net, previously known as Huobi.Net, is a strongly typed client library for accessing the HTX REST and Websocket API.

Features

Supported Frameworks

The library is targeting both .NET Standard 2.0 and .NET Standard 2.1 for optimal compatibility

.NET implementationVersion Support
.NET Core2.0 and higher
.NET Framework4.6.1 and higher
Mono5.4 and higher
Xamarin.iOS10.14 and higher
Xamarin.Android8.0 and higher
UWP10.0.16299 and higher
Unity2018.1 and higher

Install the library

NuGet

NuGet version Nuget downloads

dotnet add package JKorf.HTX.Net

GitHub packages

HTX.Net is available on GitHub packages. You'll need to add https://nuget.pkg.github.com/JKorf/index.json as a NuGet package source.

Download release

GitHub Release

The NuGet package files are added along side the source with the latest GitHub release which can found here.

How to use

REST Endpoints

// Get the ETH/USDT ticker via rest request
var restClient = new HTXRestClient();
var tickerResult = await restClient.SpotApi.ExchangeData.GetTickerAsync("ETHUSDT");
var lastPrice = tickerResult.Data.ClosePrice;

Websocket streams

// Subscribe to ETH/USDT ticker updates via the websocket API
var socketClient = new HTXSocketClient();
var tickerSubscriptionResult = socketClient.SpotApi.SubscribeToTickerUpdatesAsync("ETHUSDT", (update) =>
{
	var lastPrice = update.Data.ClosePrice;
});

For information on the clients, dependency injection, response processing and more see the HTX.Net documentation, CryptoExchange.Net documentation, or have a look at the examples here or here.

CryptoExchange.Net

HTX.Net is based on the CryptoExchange.Net base library. Other exchange API implementations based on the CryptoExchange.Net base library are available and follow the same logic.

CryptoExchange.Net also allows for easy access to different exchange API's.

ExchangeRepositoryNuget
BinanceJKorf/Binance.NetNuget version
BingXJKorf/BingX.NetNuget version
BitfinexJKorf/Bitfinex.NetNuget version
BitgetJKorf/Bitget.NetNuget version
BitMartJKorf/BitMart.NetNuget version
BybitJKorf/Bybit.NetNuget version
CoinbaseJKorf/Coinbase.NetNuget version
CoinExJKorf/CoinEx.NetNuget version
CoinGeckoJKorf/CoinGecko.NetNuget version
Crypto.comJKorf/CryptoCom.NetNuget version
Gate.ioJKorf/GateIo.NetNuget version
KrakenJKorf/Kraken.NetNuget version
KucoinJKorf/Kucoin.NetNuget version
MexcJKorf/Mexc.NetNuget version
OKXJKorf/OKX.NetNuget version

Discord

Nuget version
A Discord server is available here. Feel free to join for discussion and/or questions around the CryptoExchange.Net and implementation libraries.

Supported functionality

Spot Api

APISupportedLocation
Reference DatarestClient.SpotApi.ExchangeData
Market DatarestClient.SpotApi.ExchangeData
AccountrestClient.SpotApi.Account
WalletrestClient.SpotApi.Account
Sub user managementrestClient.SpotApi.SubAccount
TradingrestClient.SpotApi.Trading
Conditional OrderrestClient.SpotApi.Trading
Margin LoanrestClient.SpotApi.Account
Websocket Market DatasocketClient.SpotApi
Websocket Account and OrdersocketClient.SpotApi

USDT-M Api

APISupportedLocation
Reference DatarestClient.UsdtMarginSwapApi.ExchangeData
Swap Market Data InterfacerestClient.UsdtMarginSwapApi.ExchangeData
Swap Account InterfacerestClient.UsdtMarginSwapApi.Account
Swap Trade InterfacerestClient.UsdtMarginSwapApi.Trading
Swap Strategy Order InterfaceX
Swap Transferring InterfaceXrestClient.SpotApi.Account
Websocket Market InterfacesocketClient.UsdtMarginSwapApi
Websocket Index and Basis InterfacesocketClient.UsdtMarginSwapApi
Orders And Account WebSocketX
WebSocket System updatesX

Coin-M Futures Api

APISupportedLocation
*X

Coin-M Swap Api

APISupportedLocation
*X

Support the project

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