diff --git a/Examples/BlazorClient/BlazorClient.csproj b/Examples/BlazorClient/BlazorClient.csproj index 6d7fd6a..b3fa91e 100644 --- a/Examples/BlazorClient/BlazorClient.csproj +++ b/Examples/BlazorClient/BlazorClient.csproj @@ -5,15 +5,16 @@ - - - - - - - - - + + + + + + + + + + diff --git a/Examples/BlazorClient/Pages/Index.razor b/Examples/BlazorClient/Pages/Index.razor index a3b59db..196e467 100644 --- a/Examples/BlazorClient/Pages/Index.razor +++ b/Examples/BlazorClient/Pages/Index.razor @@ -1,5 +1,6 @@ @page "/" @inject IBinanceRestClient binanceClient +@inject IBingXRestClient bingXClient @inject IBitfinexRestClient bitfinexClient @inject IBitgetRestClient bitgetClient @inject IBybitRestClient bybitClient @@ -21,6 +22,7 @@ protected override async Task OnInitializedAsync() { var binanceTask = binanceClient.SpotApi.ExchangeData.GetTickerAsync("BTCUSDT"); + var bingXTask = bingXClient.SpotApi.ExchangeData.GetTickersAsync("BTC-USDT"); var bitfinexTask = bitfinexClient.SpotApi.ExchangeData.GetTickerAsync("tBTCUSD"); var bitgetTask = bitgetClient.SpotApi.ExchangeData.GetTickerAsync("BTCUSDT_SPBL"); var bybitTask = bybitClient.V5Api.ExchangeData.GetSpotTickersAsync("BTCUSDT"); @@ -30,10 +32,13 @@ var kucoinTask = kucoinClient.SpotApi.ExchangeData.GetTickerAsync("BTC-USDT"); var okxTask = okxClient.UnifiedApi.ExchangeData.GetTickerAsync("BTCUSDT"); - await Task.WhenAll(binanceTask, bitfinexTask, bybitTask, coinexTask, huobiTask, krakenTask, kucoinTask); + await Task.WhenAll(binanceTask, bingXTask, bitfinexTask, bybitTask, coinexTask, huobiTask, krakenTask, kucoinTask); if (binanceTask.Result.Success) _prices.Add("Binance", binanceTask.Result.Data.LastPrice); + + if (bingXTask.Result.Success) + _prices.Add("BingX", bingXTask.Result.Data.First().LastPrice); if (bitfinexTask.Result.Success) _prices.Add("Bitfinex", bitfinexTask.Result.Data.LastPrice); diff --git a/Examples/BlazorClient/Pages/LiveData.razor b/Examples/BlazorClient/Pages/LiveData.razor index 651e244..3816521 100644 --- a/Examples/BlazorClient/Pages/LiveData.razor +++ b/Examples/BlazorClient/Pages/LiveData.razor @@ -1,5 +1,6 @@ @page "/LiveData" @inject IBinanceSocketClient binanceSocketClient +@inject IBingXSocketClient bingXSocketClient @inject IBitfinexSocketClient bitfinexSocketClient @inject IBitgetSocketClient bitgetSocketClient @inject IBybitSocketClient bybitSocketClient @@ -29,6 +30,7 @@ var tasks = new Task>[] { binanceSocketClient.SpotApi.ExchangeData.SubscribeToTickerUpdatesAsync("ETHBTC", data => UpdateData("Binance", data.Data.LastPrice)), + bingXSocketClient.SpotApi.SubscribeToTickerUpdatesAsync("ETH-BTC", data => UpdateData("BingX", data.Data.LastPrice)), bitfinexSocketClient.SpotApi.SubscribeToTickerUpdatesAsync("tETHBTC", data => UpdateData("Bitfinex", data.Data.LastPrice)), bitgetSocketClient.SpotApi.SubscribeToTickerUpdatesAsync("ETHBTC", data => UpdateData("Bitget", data.Data.LastPrice)), bybitSocketClient.V5SpotApi.SubscribeToTickerUpdatesAsync("ETHBTC", data => UpdateData("Bybit", data.Data.LastPrice)), diff --git a/Examples/BlazorClient/Pages/OrderBooks.razor b/Examples/BlazorClient/Pages/OrderBooks.razor index 1f96691..7d2d2ae 100644 --- a/Examples/BlazorClient/Pages/OrderBooks.razor +++ b/Examples/BlazorClient/Pages/OrderBooks.razor @@ -2,6 +2,7 @@ @using System.Collections.Concurrent @using System.Timers @using Binance.Net.Interfaces +@using BingX.Net.Interfaces @using Bitfinex.Net.Interfaces @using Bitget.Net.Interfaces; @using Bybit.Net.Interfaces @@ -13,6 +14,7 @@ @using Kucoin.Net.Interfaces @using OKX.Net.Interfaces; @inject IBinanceOrderBookFactory binanceFactory +@inject IBingXOrderBookFactory bingXFactory @inject IBitfinexOrderBookFactory bitfinexFactory @inject IBitgetOrderBookFactory bitgetFactory @inject IBybitOrderBookFactory bybitFactory @@ -55,6 +57,7 @@ _books = new Dictionary { { "Binance", binanceFactory.CreateSpot("ETHBTC") }, + { "BingX", bingXFactory.CreateSpot("ETH-BTC") }, { "Bitfinex", bitfinexFactory.Create("tETHBTC") }, { "Bitget", bitgetFactory.CreateSpot("ETHBTC") }, { "Bybit", bybitFactory.Create("ETHBTC", Bybit.Net.Enums.Category.Spot) }, diff --git a/Examples/BlazorClient/Startup.cs b/Examples/BlazorClient/Startup.cs index 914843d..18cb770 100644 --- a/Examples/BlazorClient/Startup.cs +++ b/Examples/BlazorClient/Startup.cs @@ -36,6 +36,7 @@ namespace BlazorClient socketOptions.ApiCredentials = new ApiCredentials("KEY", "SECRET"); }); + services.AddBingX(); services.AddBitfinex(); services.AddBitget(); services.AddBybit(); diff --git a/Examples/BlazorClient/_Imports.razor b/Examples/BlazorClient/_Imports.razor index a6229d6..96db5a9 100644 --- a/Examples/BlazorClient/_Imports.razor +++ b/Examples/BlazorClient/_Imports.razor @@ -9,6 +9,7 @@ @using BlazorClient @using BlazorClient.Shared @using Binance.Net.Interfaces.Clients; +@using BingX.Net.Interfaces.Clients; @using Bitfinex.Net.Interfaces.Clients; @using Bitget.Net.Interfaces.Clients; @using Bybit.Net.Interfaces.Clients; diff --git a/README.md b/README.md index 4062197..c963065 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ The following API's are directly supported. Note that there are 3rd party implem |Exchange|Repository|Nuget| |--|--|--| |Binance|[JKorf/Binance.Net](https://github.com/JKorf/Binance.Net)|[![Nuget version](https://img.shields.io/nuget/v/Binance.net.svg?style=flat-square)](https://www.nuget.org/packages/Binance.Net)| +|BingX|[JKorf/BingX.Net](https://github.com/JKorf/BingX.Net)|[![Nuget version](https://img.shields.io/nuget/v/JK.BingX.net.svg?style=flat-square)](https://www.nuget.org/packages/JK.BingX.Net)| |Bitfinex|[JKorf/Bitfinex.Net](https://github.com/JKorf/Bitfinex.Net)|[![Nuget version](https://img.shields.io/nuget/v/Bitfinex.net.svg?style=flat-square)](https://www.nuget.org/packages/Bitfinex.Net)| |Bitget|[JKorf/Bitget.Net](https://github.com/JKorf/Bitget.Net)|[![Nuget version](https://img.shields.io/nuget/v/JK.Bitget.net.svg?style=flat-square)](https://www.nuget.org/packages/JK.Bitget.Net)| |Bybit|[JKorf/Bybit.Net](https://github.com/JKorf/Bybit.Net)|[![Nuget version](https://img.shields.io/nuget/v/Bybit.net.svg?style=flat-square)](https://www.nuget.org/packages/Bybit.Net)|