From 29845a250538d106243d75a52295694a7a2984b0 Mon Sep 17 00:00:00 2001 From: JKorf Date: Sun, 12 Jul 2026 21:24:20 +0200 Subject: [PATCH 1/5] wip --- Bitget.Net/Bitget.Net.csproj | 4 +- .../BitgetRestClientFuturesApiShared.cs | 51 ++++++++++++++----- .../BitgetRestClientSpotApiShared.cs | 32 ++++++++++-- 3 files changed, 67 insertions(+), 20 deletions(-) diff --git a/Bitget.Net/Bitget.Net.csproj b/Bitget.Net/Bitget.Net.csproj index f592ce7..a51aab4 100644 --- a/Bitget.Net/Bitget.Net.csproj +++ b/Bitget.Net/Bitget.Net.csproj @@ -56,10 +56,12 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - all runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file diff --git a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs index f19b1aa..9da32fd 100644 --- a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs +++ b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs @@ -3,6 +3,7 @@ using Bitget.Net.Interfaces.Clients.FuturesApiV2; using Bitget.Net.Objects.Models.V2; using CryptoExchange.Net; +using CryptoExchange.Net.Interfaces; using CryptoExchange.Net.Objects; using CryptoExchange.Net.Objects.Errors; using CryptoExchange.Net.SharedApis; @@ -199,16 +200,30 @@ async Task> IFuturesSymbolRestClient.GetFuture || ((request.TradingMode == TradingMode.DeliveryLinear || request.TradingMode == TradingMode.DeliveryInverse) && x.ContractType == ContractType.Delivery)); } - var response = HttpResult.Ok(result, data.Select(s => - new SharedFuturesSymbol( - productType == BitgetProductTypeV2.CoinFutures && s.ContractType == ContractType.Delivery ? TradingMode.DeliveryInverse : - productType == BitgetProductTypeV2.CoinFutures && s.ContractType == ContractType.Perpetual ? TradingMode.PerpetualInverse : - s.DeliveryPeriod.HasValue ? TradingMode.DeliveryLinear : - TradingMode.PerpetualLinear, - s.BaseAsset, - s.QuoteAsset, - s.Symbol, - s.Status == Enums.V2.FuturesSymbolStatus.Normal) + var resultData = data.Select(s => ParseSymbol(s, productType)).ToArray(); + ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, resultData); + + if (request.SymbolType != null) + resultData = resultData.Where(s => s.SymbolType == request.SymbolType).ToArray(); + if (request.SymbolSubType != null) + resultData = resultData.Where(s => s.SymbolSubType == request.SymbolSubType).ToArray(); + + var response = HttpResult.Ok(result, resultData); + return response; + } + + private SharedFuturesSymbol ParseSymbol(BitgetContract s, BitgetProductTypeV2 productType) + { + var (symbolType, subType) = ParseSymbolType(s); + return new SharedFuturesSymbol( + productType == BitgetProductTypeV2.CoinFutures && s.ContractType == ContractType.Delivery ? TradingMode.DeliveryInverse : + productType == BitgetProductTypeV2.CoinFutures && s.ContractType == ContractType.Perpetual ? TradingMode.PerpetualInverse : + s.DeliveryPeriod.HasValue ? TradingMode.DeliveryLinear : + TradingMode.PerpetualLinear, + s.BaseAsset, + s.QuoteAsset, + s.Symbol, + s.Status == Enums.V2.FuturesSymbolStatus.Normal) { MinTradeQuantity = s.MinOrderQuantity, PriceDecimals = s.PriceDecimals, @@ -219,11 +234,19 @@ async Task> IFuturesSymbolRestClient.GetFuture ContractSize = 1, MaxShortLeverage = s.MaxLeverage, MaxLongLeverage = s.MaxLeverage, - MaxTradeQuantity = s.MaxLimitOrderQuantity == null && s.MaxLimitOrderQuantity == null ? null : Math.Min(s.MaxLimitOrderQuantity ?? decimal.MaxValue, s.MaxMarketOrderQuantity ?? decimal.MaxValue) - }).ToArray()); + MaxTradeQuantity = s.MaxLimitOrderQuantity == null && s.MaxLimitOrderQuantity == null ? null : Math.Min(s.MaxLimitOrderQuantity ?? decimal.MaxValue, s.MaxMarketOrderQuantity ?? decimal.MaxValue), + DisplayName = s.Symbol, + SymbolType = symbolType, + SymbolSubType = subType + }; + } - ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, response.Data!); - return response; + private (SymbolAssetType, SymbolAssetSubType?) ParseSymbolType(BitgetContract s) + { + if (s.IsRwa) + return (SymbolAssetType.Rwa, null); + + return (SymbolAssetType.CryptoOrFiat, null); } async Task> IFuturesSymbolRestClient.GetFuturesSymbolsForBaseAssetAsync(string baseAsset) diff --git a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs index d1931fa..42b88d4 100644 --- a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs +++ b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs @@ -95,17 +95,39 @@ async Task> ISpotSymbolRestClient.GetSpotSymbolsA if (!result.Success) return HttpResult.Fail(result); - var response = HttpResult.Ok(result, result.Data.Select(s => new SharedSpotSymbol(s.BaseAsset, s.QuoteAsset, s.Symbol, s.Status == Enums.SymbolStatus.Online) + var resultData = result.Data.Select(ParseSymbol); + ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, resultData.ToArray()); + + if (request.SymbolType != null) + resultData = resultData.Where(x => x.SymbolType == request.SymbolType); + if (request.SymbolSubType != null) + resultData = resultData.Where(x => x.SymbolSubType == request.SymbolSubType); + + return HttpResult.Ok(result, resultData.ToArray()); + } + + private SharedSpotSymbol ParseSymbol(BitgetSymbol s) + { + var (symbolType, symbolSubType) = ParseSymbolType(s); + return new SharedSpotSymbol(s.BaseAsset, s.QuoteAsset, s.Symbol, s.Status == Enums.SymbolStatus.Online) { MinTradeQuantity = s.MinOrderQuantity, MinNotionalValue = s.MinOrderValue, MaxTradeQuantity = s.MaxOrderQuantity, QuantityDecimals = s.QuantityPrecision, - PriceDecimals = s.PricePrecision - }).ToArray()); + PriceDecimals = s.PricePrecision, + SymbolType = symbolType, + SymbolSubType = symbolSubType, + DisplayName = s.Symbol + }; + } + + private (SymbolAssetType, SymbolAssetSubType?) ParseSymbolType(BitgetSymbol s) + { + if (LibraryHelpers.IsStableCoin(s.BaseAsset)) + return (SymbolAssetType.CryptoOrFiat, SymbolAssetSubType.StableCoin); - ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, response.Data!); - return response; + return (SymbolAssetType.CryptoOrFiat, null); } async Task> ISpotSymbolRestClient.GetSpotSymbolsForBaseAssetAsync(string baseAsset) From 1ad122aa06a69f12e93af23158396b307d8f2a23 Mon Sep 17 00:00:00 2001 From: Jkorf Date: Wed, 15 Jul 2026 16:21:40 +0200 Subject: [PATCH 2/5] wip --- .../BitgetRestClientFuturesApi.cs | 4 + .../BitgetRestClientFuturesApiShared.cs | 95 +++++++++++-------- .../SpotApiV2/BitgetRestClientSpotApi.cs | 4 + .../BitgetRestClientSpotApiShared.cs | 66 +++++++++---- 4 files changed, 108 insertions(+), 61 deletions(-) diff --git a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApi.cs b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApi.cs index ea776ea..5fab620 100644 --- a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApi.cs +++ b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApi.cs @@ -32,11 +32,15 @@ internal partial class BitgetRestClientFuturesApi : RestApiClient public string ExchangeName => "Bitget"; + internal BitgetRestClient _baseClient; + protected override IRestMessageHandler MessageHandler { get; } = new BitgetRestMessageHandler(BitgetErrors.RestErrors); internal BitgetRestClientFuturesApi(ILoggerFactory? loggerFactory, HttpClient? httpClient, BitgetRestClient baseClient, BitgetRestOptions options) : base(loggerFactory, BitgetExchange.Metadata.Id, httpClient, options.Environment.RestBaseAddress, options, options.FuturesOptions) { + _baseClient = baseClient; + Account = new BitgetRestClientFuturesApiAccount(this); ExchangeData = new BitgetRestClientFuturesApiExchangeData(this); Trading = new BitgetRestClientFuturesApiTrading(this); diff --git a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs index 9da32fd..523cb72 100644 --- a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs +++ b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs @@ -1,6 +1,8 @@ using Bitget.Net.Enums; +using Bitget.Net.Enums.Uta; using Bitget.Net.Enums.V2; using Bitget.Net.Interfaces.Clients.FuturesApiV2; +using Bitget.Net.Objects.Models; using Bitget.Net.Objects.Models.V2; using CryptoExchange.Net; using CryptoExchange.Net.Interfaces; @@ -172,6 +174,7 @@ async Task> IBookTickerRestClient.GetBookTickerAsyn #region Futures Symbol client + SharedSymbolCatalog? IFuturesSymbolRestClient.FuturesSymbolCatalog => ExchangeSymbolCache.GetSymbolCatalog(_topicId, EnvironmentName, null); GetFuturesSymbolsOptions IFuturesSymbolRestClient.GetFuturesSymbolsOptions { get; } = new GetFuturesSymbolsOptions(_exchangeName, false) { RequiredExchangeParameters = new List @@ -185,68 +188,71 @@ async Task> IFuturesSymbolRestClient.GetFuture if (validationError != null) return HttpResult.Fail(Exchange, validationError); - var productType = GetProductType(request.TradingMode, request.ExchangeParameters); - var result = await ExchangeData.GetContractsAsync( - productType, + var productCategory = GetProductCategory(request.TradingMode, request.ExchangeParameters); + var result = await _baseClient.UnifiedApi.ExchangeData.GetFuturesSymbolsAsync( + productCategory, ct: ct).ConfigureAwait(false); if (!result.Success) return HttpResult.Fail(result); - IEnumerable data = result.Data; - if (request.TradingMode != null) - { - data = data - .Where(x => ((request.TradingMode == TradingMode.PerpetualInverse || request.TradingMode == TradingMode.PerpetualLinear) && x.ContractType == ContractType.Perpetual) - || ((request.TradingMode == TradingMode.DeliveryLinear || request.TradingMode == TradingMode.DeliveryInverse) && x.ContractType == ContractType.Delivery)); - } + var data = result.Data + .Select(x => ParseSymbol(x, productCategory)) + .ToArray(); - var resultData = data.Select(s => ParseSymbol(s, productType)).ToArray(); - ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, resultData); - - if (request.SymbolType != null) - resultData = resultData.Where(s => s.SymbolType == request.SymbolType).ToArray(); - if (request.SymbolSubType != null) - resultData = resultData.Where(s => s.SymbolSubType == request.SymbolSubType).ToArray(); - - var response = HttpResult.Ok(result, resultData); - return response; + ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, productCategory.ToString(), data); + return HttpResult.Ok(result, SharedUtils.ApplySymbolFilter(data, request)); } - private SharedFuturesSymbol ParseSymbol(BitgetContract s, BitgetProductTypeV2 productType) + private SharedFuturesSymbol ParseSymbol(BitgetUaFuturesSymbol s, ProductCategory productCategory) { - var (symbolType, subType) = ParseSymbolType(s); - return new SharedFuturesSymbol( - productType == BitgetProductTypeV2.CoinFutures && s.ContractType == ContractType.Delivery ? TradingMode.DeliveryInverse : - productType == BitgetProductTypeV2.CoinFutures && s.ContractType == ContractType.Perpetual ? TradingMode.PerpetualInverse : + var result = new SharedFuturesSymbol( + productCategory == ProductCategory.CoinFutures && s.Type == ContractType.Delivery ? TradingMode.DeliveryInverse : + productCategory == ProductCategory.CoinFutures && s.Type == ContractType.Perpetual ? TradingMode.PerpetualInverse : s.DeliveryPeriod.HasValue ? TradingMode.DeliveryLinear : TradingMode.PerpetualLinear, s.BaseAsset, s.QuoteAsset, s.Symbol, - s.Status == Enums.V2.FuturesSymbolStatus.Normal) + s.Status == InstrumentStatus.Online) { MinTradeQuantity = s.MinOrderQuantity, - PriceDecimals = s.PriceDecimals, - QuantityDecimals = s.QuantityDecimals, + PriceDecimals = s.PricePrecision, + QuantityDecimals = s.QuantityPrecision, DeliveryTime = s.DeliveryTime, - PriceStep = s.PriceStep, - QuantityStep = s.QuantityStep, + PriceStep = s.PriceMultiplier, + QuantityStep = s.QuantityMultiplier, ContractSize = 1, MaxShortLeverage = s.MaxLeverage, MaxLongLeverage = s.MaxLeverage, - MaxTradeQuantity = s.MaxLimitOrderQuantity == null && s.MaxLimitOrderQuantity == null ? null : Math.Min(s.MaxLimitOrderQuantity ?? decimal.MaxValue, s.MaxMarketOrderQuantity ?? decimal.MaxValue), + MaxTradeQuantity = Math.Min(s.MaxOrderQuantity, s.MaxMarketOrderQuantity), DisplayName = s.Symbol, - SymbolType = symbolType, - SymbolSubType = subType }; + + if (productCategory != ProductCategory.CoinFutures) + { + result.BaseAssetType = s.IsRwa ? SharedAssetType.TradFi : SharedAssetType.Crypto; + result.BaseAssetSubType = ParseSymbolSubType(s); + result.QuoteAssetType = SharedAssetType.Crypto; + result.QuoteAssetSubType = SharedAssetSubType.StableCoin; + } + else + { + result.BaseAssetType = SharedAssetType.Crypto; + result.QuoteAssetType = SharedAssetType.Fiat; + } + + return result; } - private (SymbolAssetType, SymbolAssetSubType?) ParseSymbolType(BitgetContract s) + private SharedAssetSubType? ParseSymbolSubType(BitgetUaFuturesSymbol s) { - if (s.IsRwa) - return (SymbolAssetType.Rwa, null); + if (s.SymbolType == SymbolType.Commodity || s.SymbolType == SymbolType.Metal) + return SharedAssetSubType.Commodity; - return (SymbolAssetType.CryptoOrFiat, null); + if (s.SymbolType == SymbolType.Stock) + return SharedAssetSubType.Stock; + + return null; } async Task> IFuturesSymbolRestClient.GetFuturesSymbolsForBaseAssetAsync(string baseAsset) @@ -1513,11 +1519,18 @@ private BitgetProductTypeV2 GetProductType(TradingMode? tradingMode, ExchangePar return (BitgetProductTypeV2)Enum.Parse(typeof(BitgetProductTypeV2), productTypeStr!); } - public static DateTime RoundUp(DateTime dt, TimeSpan d) + private ProductCategory GetProductCategory(TradingMode? tradingMode, ExchangeParameters? exchangeParameters) { - var modTicks = dt.Ticks % d.Ticks; - var delta = modTicks != 0 ? d.Ticks - modTicks : 0; - return new DateTime(dt.Ticks + delta, dt.Kind); + var productType = GetProductType(tradingMode, exchangeParameters); + if (productType == BitgetProductTypeV2.CoinFutures) + return ProductCategory.CoinFutures; + else if(productType == BitgetProductTypeV2.UsdtFutures) + return ProductCategory.UsdtFutures; + else if (productType == BitgetProductTypeV2.UsdcFutures) + return ProductCategory.UsdcFutures; + + throw new ArgumentException("ProductType", $"Invalid product type {productType} for futures"); } + } } diff --git a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApi.cs b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApi.cs index eeaf886..b7beb09 100644 --- a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApi.cs +++ b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApi.cs @@ -38,9 +38,13 @@ internal partial class BitgetRestClientSpotApi : RestApiClient ExchangeParameters.SetStaticParameter(Exchange, key, value); public void ResetDefaultExchangeParameters() => ExchangeParameters.ResetStaticParameters(); public SharedClientInfo Discover() => SharedUtils.GetClientInfo(BitgetExchange.Metadata, this); + private static HashSet _exchangeSupportedFiatCurrencies = ["EUR", "USD", "BRL"]; #region Kline client @@ -83,6 +85,7 @@ async Task> IKlineRestClient.GetKlinesAsync(GetKlinesR #endregion #region Spot Symbol client + SharedSymbolCatalog? ISpotSymbolRestClient.SpotSymbolCatalog => ExchangeSymbolCache.GetSymbolCatalog(_topicId, EnvironmentName, null); GetSpotSymbolsOptions ISpotSymbolRestClient.GetSpotSymbolsOptions { get; } = new GetSpotSymbolsOptions(_exchangeName, false); async Task> ISpotSymbolRestClient.GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct) @@ -91,43 +94,66 @@ async Task> ISpotSymbolRestClient.GetSpotSymbolsA if (validationError != null) return HttpResult.Fail(Exchange, validationError); - var result = await ExchangeData.GetSymbolsAsync(ct: ct).ConfigureAwait(false); + var result = await _baseClient.UnifiedApi.ExchangeData.GetSpotSymbolsAsync(ct: ct).ConfigureAwait(false); if (!result.Success) return HttpResult.Fail(result); - var resultData = result.Data.Select(ParseSymbol); - ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, resultData.ToArray()); + var data = result.Data + .Select(x => ParseSymbol(x)!) + .Where(x => x != null) + .ToArray(); - if (request.SymbolType != null) - resultData = resultData.Where(x => x.SymbolType == request.SymbolType); - if (request.SymbolSubType != null) - resultData = resultData.Where(x => x.SymbolSubType == request.SymbolSubType); - - return HttpResult.Ok(result, resultData.ToArray()); + ExchangeSymbolCache.UpdateSymbolInfo(_topicId, EnvironmentName, null, data); + return HttpResult.Ok(result, SharedUtils.ApplySymbolFilter(data, request)); } - private SharedSpotSymbol ParseSymbol(BitgetSymbol s) + private SharedSpotSymbol ParseSymbol(BitgetUaSpotSymbol s) { - var (symbolType, symbolSubType) = ParseSymbolType(s); - return new SharedSpotSymbol(s.BaseAsset, s.QuoteAsset, s.Symbol, s.Status == Enums.SymbolStatus.Online) + var result = new SharedSpotSymbol(s.BaseAsset, s.QuoteAsset, s.Symbol, s.Status == Enums.Uta.InstrumentStatus.Online) { MinTradeQuantity = s.MinOrderQuantity, MinNotionalValue = s.MinOrderValue, MaxTradeQuantity = s.MaxOrderQuantity, QuantityDecimals = s.QuantityPrecision, PriceDecimals = s.PricePrecision, - SymbolType = symbolType, - SymbolSubType = symbolSubType, DisplayName = s.Symbol }; - } - private (SymbolAssetType, SymbolAssetSubType?) ParseSymbolType(BitgetSymbol s) - { - if (LibraryHelpers.IsStableCoin(s.BaseAsset)) - return (SymbolAssetType.CryptoOrFiat, SymbolAssetSubType.StableCoin); + if (s.SymbolType == Enums.Uta.SymbolType.Commodity || s.SymbolType == Enums.Uta.SymbolType.Metal) + { + result.BaseAssetType = SharedAssetType.TradFi; + result.BaseAssetSubType = SharedAssetSubType.Commodity; + } + else if (s.SymbolType == Enums.Uta.SymbolType.Stock) + { + result.BaseAssetType = SharedAssetType.TradFi; + result.BaseAssetSubType = SharedAssetSubType.Stock; + } + else if (LibraryHelpers.IsStableCoin(s.BaseAsset)) + { + result.BaseAssetType = SharedAssetType.Crypto; + result.BaseAssetSubType = SharedAssetSubType.StableCoin; + } + else if (_exchangeSupportedFiatCurrencies.Contains(s.BaseAsset)) + { + result.BaseAssetType = SharedAssetType.Fiat; + } + else + { + result.BaseAssetType = SharedAssetType.Crypto; + } + + if (LibraryHelpers.IsStableCoin(s.QuoteAsset)) + { + result.QuoteAssetType = SharedAssetType.Crypto; + result.QuoteAssetSubType = SharedAssetSubType.StableCoin; + } + else if (_exchangeSupportedFiatCurrencies.Contains(s.QuoteAsset)) + { + result.QuoteAssetType = SharedAssetType.Fiat; + } - return (SymbolAssetType.CryptoOrFiat, null); + return result; } async Task> ISpotSymbolRestClient.GetSpotSymbolsForBaseAssetAsync(string baseAsset) From 7a63ba1f996f0313b77a5a5d9448da2bc89713b1 Mon Sep 17 00:00:00 2001 From: Jkorf Date: Fri, 17 Jul 2026 16:36:46 +0200 Subject: [PATCH 3/5] wip --- .../Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs | 2 +- Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs index 523cb72..efa8a53 100644 --- a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs +++ b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs @@ -250,7 +250,7 @@ private SharedFuturesSymbol ParseSymbol(BitgetUaFuturesSymbol s, ProductCategory return SharedAssetSubType.Commodity; if (s.SymbolType == SymbolType.Stock) - return SharedAssetSubType.Stock; + return SharedAssetSubType.Equity; return null; } diff --git a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs index 95312bb..489755d 100644 --- a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs +++ b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs @@ -127,7 +127,7 @@ private SharedSpotSymbol ParseSymbol(BitgetUaSpotSymbol s) else if (s.SymbolType == Enums.Uta.SymbolType.Stock) { result.BaseAssetType = SharedAssetType.TradFi; - result.BaseAssetSubType = SharedAssetSubType.Stock; + result.BaseAssetSubType = SharedAssetSubType.Equity; } else if (LibraryHelpers.IsStableCoin(s.BaseAsset)) { From 2c5f3c06712c74cbbab8f0612e7ad1caee207da5 Mon Sep 17 00:00:00 2001 From: JKorf Date: Sun, 19 Jul 2026 20:30:10 +0200 Subject: [PATCH 4/5] wip --- Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs index 489755d..b1e88cf 100644 --- a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs +++ b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs @@ -152,6 +152,10 @@ private SharedSpotSymbol ParseSymbol(BitgetUaSpotSymbol s) { result.QuoteAssetType = SharedAssetType.Fiat; } + else + { + result.QuoteAssetType = SharedAssetType.Crypto; + } return result; } From 198324210ff3725bd6a62426c3a8b9e6338dbeec Mon Sep 17 00:00:00 2001 From: Jkorf Date: Mon, 20 Jul 2026 14:23:42 +0200 Subject: [PATCH 5/5] wip --- Bitget.Net/Bitget.Net.csproj | 6 ++---- .../FuturesApiV2/BitgetRestClientFuturesApiShared.cs | 2 +- .../Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Bitget.Net/Bitget.Net.csproj b/Bitget.Net/Bitget.Net.csproj index a51aab4..7bc9e0a 100644 --- a/Bitget.Net/Bitget.Net.csproj +++ b/Bitget.Net/Bitget.Net.csproj @@ -1,4 +1,4 @@ - + net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1 latest @@ -56,12 +56,10 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - \ No newline at end of file diff --git a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs index efa8a53..585cbeb 100644 --- a/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs +++ b/Bitget.Net/Clients/FuturesApiV2/BitgetRestClientFuturesApiShared.cs @@ -174,7 +174,7 @@ async Task> IBookTickerRestClient.GetBookTickerAsyn #region Futures Symbol client - SharedSymbolCatalog? IFuturesSymbolRestClient.FuturesSymbolCatalog => ExchangeSymbolCache.GetSymbolCatalog(_topicId, EnvironmentName, null); + SharedSymbolCatalog? IFuturesSymbolRestClient.FuturesSymbolCatalog => ExchangeSymbolCache.GetSymbolCatalog(_exchangeName, _topicId, EnvironmentName, null); GetFuturesSymbolsOptions IFuturesSymbolRestClient.GetFuturesSymbolsOptions { get; } = new GetFuturesSymbolsOptions(_exchangeName, false) { RequiredExchangeParameters = new List diff --git a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs index b1e88cf..55758c3 100644 --- a/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs +++ b/Bitget.Net/Clients/SpotApiV2/BitgetRestClientSpotApiShared.cs @@ -85,7 +85,7 @@ async Task> IKlineRestClient.GetKlinesAsync(GetKlinesR #endregion #region Spot Symbol client - SharedSymbolCatalog? ISpotSymbolRestClient.SpotSymbolCatalog => ExchangeSymbolCache.GetSymbolCatalog(_topicId, EnvironmentName, null); + SharedSymbolCatalog? ISpotSymbolRestClient.SpotSymbolCatalog => ExchangeSymbolCache.GetSymbolCatalog(_exchangeName, _topicId, EnvironmentName, null); GetSpotSymbolsOptions ISpotSymbolRestClient.GetSpotSymbolsOptions { get; } = new GetSpotSymbolsOptions(_exchangeName, false); async Task> ISpotSymbolRestClient.GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct)