Weex.Net

May 9, 2026 · View on GitHub

.NET License

Weex.Net is a client library for accessing the Weex REST and Websocket API.

Features

  • Response data is mapped to descriptive models
  • Input parameters and response values are mapped to discriptive enum values where possible
  • High performance
  • Automatic websocket (re)connection management
  • Client side rate limiting
  • Client side order book implementation
  • Support for managing different accounts
  • Extensive logging
  • Support for different environments
  • Easy integration with other exchange clients based on the CryptoExchange.Net base library
  • Native AOT support

Supported Frameworks

The library is targeting both .NET Standard 2.0 and .NET Standard 2.1 for optimal compatibility, as well as the latest dotnet versions to use the latest framework features.

.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 Weex.Net

GitHub packages

Weex.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

Basic request:

// Get the ETH/USDT ticker via rest request
var restClient = new WeexRestClient();
var tickerResult = await restClient.SpotApi.ExchangeData.GetTickersAsync(["ETHUSDT"]);
var lastPrice = tickerResult.Data.Single().LastPrice;

Place order:

var restClient = new WeexRestClient(opts => {
    opts.ApiCredentials = new WeexCredentials("APIKEY", "APISECRET", "PASS");
});

// Place Limit order to go long 0.1 for ETH at 2000
var orderResult = await restClient.FuturesApi.Trading.PlaceOrderAsync(
    "ETH_USDT",
    OrderSide.Buy,
    PositionSide.Long,
    OrderType.Limit,
    0.1m,
    price: 2000,
    timeInForce: TimeInForce.GoodTillCanceled
    );

WebSocket subscription:

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

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

AI / LLM documentation

Weex.Net includes AI-oriented documentation and examples for code generation tools:

FilePurpose
AGENTS.mdAssistant skill with core Weex.Net patterns, pitfalls, and examples
llms.txtShort LLM index with links to docs, examples, and critical usage rules
llms-full.txtDetailed LLM context with endpoint routing, code patterns, and anti-hallucination checks
docs/ai-api-map.mdTable-style intent-to-method map for Spot, Futures, WebSocket, and SharedApis
Examples/ai-friendlyCompilable single-file examples for common REST, WebSocket, shared API, and error handling workflows

GitHub Copilot and Cursor instructions are also provided in .github/copilot-instructions.md and .cursor/rules/weex-net.mdc; both point back to the root AI context files.

CryptoExchange.Net

Weex.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
AsterJKorf/Aster.NetNuget version
BinanceJKorf/Binance.NetNuget version
BingXJKorf/BingX.NetNuget version
BitfinexJKorf/Bitfinex.NetNuget version
BitgetJKorf/Bitget.NetNuget version
BitMartJKorf/BitMart.NetNuget version
BitMEXJKorf/BitMEX.NetNuget version
BitstampJKorf/Bitstamp.NetNuget version
BloFinJKorf/BloFin.NetNuget version
BybitJKorf/Bybit.NetNuget version
CoinbaseJKorf/Coinbase.NetNuget version
CoinExJKorf/CoinEx.NetNuget version
CoinGeckoJKorf/CoinGecko.NetNuget version
CoinWJKorf/CoinW.NetNuget version
Crypto.comJKorf/CryptoCom.NetNuget version
DeepCoinJKorf/DeepCoin.NetNuget version
Gate.ioJKorf/GateIo.NetNuget version
HTXJKorf/HTX.NetNuget version
HyperLiquidJKorf/HyperLiquid.NetNuget version
KrakenJKorf/Kraken.NetNuget version
KucoinJKorf/Kucoin.NetNuget version
MexcJKorf/Mexc.NetNuget version
OKXJKorf/OKX.NetNuget version
ToobitJKorf/Toobit.NetNuget version
UpbitJKorf/Upbit.NetNuget version
WhiteBitJKorf/WhiteBit.NetNuget version
XTJKorf/XT.NetNuget version

When using multiple of these API's the CryptoClients.Net package can be used which combines this and the other packages and allows easy access to all exchange API's.

Discord

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

Supported functionality

Spot REST

APISupportedLocation
MarketrestClient.SpotApi.ExchangeData
AccountrestClient.SpotApi.Account
TraderestClient.SpotApi.Trading
RebateX

Spot Websocket

APISupportedLocation
PublicsocketClient.SpotApi
PrivatesocketClient.SpotApi

Futures REST

APISupportedLocation
MarketrestClient.FuturesApi.ExchangeData
AccountrestClient.FuturesApi.Account
TraderestClient.FuturesApi.Trading

Futures Websocket

APISupportedLocation
PublicsocketClient.FuturesApi
PrivatesocketClient.FuturesApi

Support the project

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.

Release notes

  • Version 1.0.0 - 10 Apr 2026
    • Initial release