Home

Awesome

.Bybit.Net Bybit.Net

.NET License

Bybit.Net is a strongly typed client library for accessing the Bybit 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 Bybit.Net

GitHub packages

Bybit.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 BybitRestClient();
var tickerResult = await restClient.V5Api.ExchangeData.GetSpotTickersAsync("ETHUSDT");
var lastPrice = tickerResult.Data.List.First().LastPrice;

Websocket streams

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

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

CryptoExchange.Net

Bybit.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
CoinExJKorf/CoinEx.NetNuget version
CoinGeckoJKorf/CoinGecko.NetNuget version
Gate.ioJKorf/GateIo.NetNuget version
Huobi/HTXJKorf/Huobi.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

V5 Api

APISupportedLocation
MarketrestClient.V5Api.ExchangeData
TraderestClient.V5Api.Account / restClient.V5Api.Trading
PositionrestClient.V5Api.Account / restClient.V5Api.Trading
Pre-UpgradeX
AccountrestClient.V5Api.Account
AssetrestClient.V5Api.Account
Spot Leverage TokenrestClient.V5Api.ExchangeData / restClient.V5Api.Trading
Spot Margin Trade (UTA)restClient.V5Api.Account
Institutional LoanX
BrokenrestClient.V5Api.Account
Websocket Stream PublicsocketClient.V5SpotApi / socketClient.V5LinearApi / socketClient.V5InverseApi / socketClient.V5OptionsApi
Websocket Stream PrivatesocketClient.V5PrivateApi

V3 Derivatives

APISupportedLocation
Rest MarketrestClient.DerivativesApi.ExchangeData
Rest ContractrestClient.DerivativesApi.Account / restClient.DerivativesApi.Trading
Websocket PublicrestClient.V5Api.DerivativesApi
Websocket PrivaterestClient.V5Api.DerivativesApi

V3 Spot

APISupportedLocation
Rest Market datarestClient.SpotV3Api.ExchangeData
Rest TraderestClient.SpotV3Api.Trading
Rest Wallet BalancerestClient.SpotV3Api.Account
Rest Leveraged TokenX
Rest Cross Margin TraderestClient.SpotV3Api.Trading
Rest Institutional LoanX
Websocket PublicrestClient.SpotV3Api
Websocket PrivaterestClient.SpotV3Api

V3 Account Asset

APISupportedLocation
*X

V3 Tax

APISupportedLocation
*X

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