Skip to content

Commit 5795729

Browse files
committed
Updated library versions, added DeepCoin.Net
1 parent 7f4f52a commit 5795729

15 files changed

+179
-20
lines changed

CryptoClients.Net/CryptoClients.Net.csproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@
4949
</PackageReference>
5050
</ItemGroup>
5151
<ItemGroup>
52-
<PackageReference Include="Binance.Net" Version="10.17.0" />
52+
<PackageReference Include="Binance.Net" Version="10.18.0" />
5353
<PackageReference Include="Bitfinex.Net" Version="8.1.1" />
54-
<PackageReference Include="BitMart.Net" Version="1.13.0" />
55-
<PackageReference Include="Bybit.Net" Version="4.1.0" />
56-
<PackageReference Include="CoinEx.Net" Version="7.15.0" />
54+
<PackageReference Include="BitMart.Net" Version="1.14.0" />
55+
<PackageReference Include="Bybit.Net" Version="4.3.2" />
56+
<PackageReference Include="CoinEx.Net" Version="8.0.1" />
5757
<PackageReference Include="CoinGecko.Net" Version="3.4.0" />
5858
<PackageReference Include="CryptoCom.Net" Version="1.6.0" />
59-
<PackageReference Include="GateIo.Net" Version="1.19.0" />
59+
<PackageReference Include="DeepCoin.Net" Version="1.0.1" />
60+
<PackageReference Include="GateIo.Net" Version="1.20.1" />
6061
<PackageReference Include="HyperLiquid.Net" Version="1.1.0" />
6162
<PackageReference Include="JK.BingX.Net" Version="1.21.0" />
6263
<PackageReference Include="JK.Bitget.Net" Version="1.21.0" />
@@ -66,11 +67,12 @@
6667
<PackageReference Include="JKorf.Coinbase.Net" Version="1.8.1" />
6768
<PackageReference Include="JKorf.HTX.Net" Version="6.9.0" />
6869
<PackageReference Include="KrakenExchange.Net" Version="5.7.1" />
69-
<PackageReference Include="Kucoin.Net" Version="5.24.0" />
70+
<PackageReference Include="Kucoin.Net" Version="6.0.0" />
7071
<PackageReference Include="WhiteBit.Net" Version="1.4.0" />
71-
<PackageReference Include="XT.Net" Version="1.2.0" />
72+
<PackageReference Include="XT.Net" Version="1.2.1" />
7273
</ItemGroup>
7374
<PropertyGroup>
7475
<DocumentationFile>CryptoClients.Net.xml</DocumentationFile>
76+
<UserSecretsId>f570a33a-3f98-4c9d-8231-42d92f9746fd</UserSecretsId>
7577
</PropertyGroup>
7678
</Project>

CryptoClients.Net/CryptoClients.Net.xml

Lines changed: 55 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CryptoClients.Net/Enums/Exchange.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Coinbase.Net;
99
using CoinEx.Net;
1010
using CryptoCom.Net;
11+
using DeepCoin.Net;
1112
using GateIo.Net;
1213
using HTX.Net;
1314
using HyperLiquid.Net;
@@ -68,6 +69,10 @@ public static class Exchange
6869
/// </summary>
6970
public static string CryptoCom => CryptoComExchange.ExchangeName;
7071
/// <summary>
72+
/// DeepCoin
73+
/// </summary>
74+
public static string DeepCoin => DeepCoinExchange.ExchangeName;
75+
/// <summary>
7176
/// Gate.io
7277
/// </summary>
7378
public static string GateIo => GateIoExchange.ExchangeName;
@@ -119,6 +124,7 @@ public static class Exchange
119124
Coinbase,
120125
CoinEx,
121126
CryptoCom,
127+
DeepCoin,
122128
GateIo,
123129
HTX,
124130
HyperLiquid,

CryptoClients.Net/ExchangeOrderBookFactory.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using CryptoCom.Net.Interfaces;
1313
using CryptoExchange.Net.Interfaces;
1414
using CryptoExchange.Net.SharedApis;
15+
using DeepCoin.Net.Interfaces;
1516
using GateIo.Net.Interfaces;
1617
using HTX.Net.Interfaces;
1718
using HyperLiquid.Net.Interfaces;
@@ -49,6 +50,8 @@ public class ExchangeOrderBookFactory : IExchangeOrderBookFactory
4950
/// <inheritdoc />
5051
public ICryptoComOrderBookFactory CryptoCom { get; }
5152
/// <inheritdoc />
53+
public IDeepCoinOrderBookFactory DeepCoin { get; }
54+
/// <inheritdoc />
5255
public IGateIoOrderBookFactory GateIo { get; }
5356
/// <inheritdoc />
5457
public IHTXOrderBookFactory HTX { get; }
@@ -81,6 +84,7 @@ public ExchangeOrderBookFactory(
8184
ICoinbaseOrderBookFactory coinbase,
8285
ICoinExOrderBookFactory coinEx,
8386
ICryptoComOrderBookFactory cryptoCom,
87+
IDeepCoinOrderBookFactory deepCoin,
8488
IGateIoOrderBookFactory gateIo,
8589
IHTXOrderBookFactory htx,
8690
IHyperLiquidOrderBookFactory hyperLiquid,
@@ -101,6 +105,7 @@ public ExchangeOrderBookFactory(
101105
Coinbase = coinbase;
102106
CoinEx = coinEx;
103107
CryptoCom = cryptoCom;
108+
DeepCoin = deepCoin;
104109
GateIo = gateIo;
105110
HTX = htx;
106111
HyperLiquid = hyperLiquid;
@@ -151,6 +156,8 @@ public ExchangeOrderBookFactory(
151156
case "CryptoCom":
152157
var cryptoComLimit = GetBookDepth(minimalDepth, false, 10, 50);
153158
return CryptoCom.Create(symbol, opts => { opts.Limit = cryptoComLimit; });
159+
case "DeepCoin":
160+
return DeepCoin.Create(symbol);
154161
case "GateIo":
155162
var gateIoLimit = GetBookDepth(minimalDepth, true, 20, 50, 100);
156163
return GateIo.Create(symbol, symbol.QuoteAsset, opts =>

CryptoClients.Net/ExchangeRestClient.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
using CryptoExchange.Net.Objects;
3939
using CryptoExchange.Net.Objects.Options;
4040
using CryptoExchange.Net.SharedApis;
41+
using DeepCoin.Net.Clients;
42+
using DeepCoin.Net.Interfaces.Clients;
43+
using DeepCoin.Net.Objects;
44+
using DeepCoin.Net.Objects.Options;
4145
using GateIo.Net.Clients;
4246
using GateIo.Net.Interfaces.Clients;
4347
using GateIo.Net.Objects.Options;
@@ -102,6 +106,8 @@ public class ExchangeRestClient : IExchangeRestClient
102106
/// <inheritdoc />
103107
public ICryptoComRestClient CryptoCom { get; }
104108
/// <inheritdoc />
109+
public IDeepCoinRestClient DeepCoin { get; }
110+
/// <inheritdoc />
105111
public IGateIoRestClient GateIo { get; }
106112
/// <inheritdoc />
107113
public IHTXRestClient HTX { get; }
@@ -290,6 +296,7 @@ public ExchangeRestClient()
290296
Coinbase = new CoinbaseRestClient();
291297
CoinEx = new CoinExRestClient();
292298
CryptoCom = new CryptoComRestClient();
299+
DeepCoin = new DeepCoinRestClient();
293300
GateIo = new GateIoRestClient();
294301
HTX = new HTXRestClient();
295302
HyperLiquid = new HyperLiquidRestClient();
@@ -319,6 +326,7 @@ public ExchangeRestClient(
319326
Action<CoinbaseRestOptions>? coinbaseRestOptions = null,
320327
Action<CoinExRestOptions>? coinExRestOptions = null,
321328
Action<CryptoComRestOptions>? cryptoComRestOptions = null,
329+
Action<DeepCoinRestOptions>? deepCoinRestOptions = null,
322330
Action<GateIoRestOptions>? gateIoRestOptions = null,
323331
Action<HTXRestOptions>? htxRestOptions = null,
324332
Action<HyperLiquidRestOptions>? hyperLiquidRestOptions = null,
@@ -362,6 +370,7 @@ Action<TOptions> SetGlobalRestOptions<TOptions, TCredentials>(GlobalExchangeOpti
362370
coinbaseRestOptions = SetGlobalRestOptions(global, coinbaseRestOptions, credentials?.Coinbase);
363371
coinExRestOptions = SetGlobalRestOptions(global, coinExRestOptions, credentials?.CoinEx);
364372
cryptoComRestOptions = SetGlobalRestOptions(global, cryptoComRestOptions, credentials?.CryptoCom);
373+
deepCoinRestOptions = SetGlobalRestOptions(global, deepCoinRestOptions, credentials?.DeepCoin);
365374
gateIoRestOptions = SetGlobalRestOptions(global, gateIoRestOptions, credentials?.GateIo);
366375
htxRestOptions = SetGlobalRestOptions(global, htxRestOptions, credentials?.HTX);
367376
hyperLiquidRestOptions = SetGlobalRestOptions(global, hyperLiquidRestOptions, credentials?.HyperLiquid);
@@ -383,6 +392,7 @@ Action<TOptions> SetGlobalRestOptions<TOptions, TCredentials>(GlobalExchangeOpti
383392
Coinbase = new CoinbaseRestClient(coinbaseRestOptions);
384393
CoinEx = new CoinExRestClient(coinExRestOptions);
385394
CryptoCom = new CryptoComRestClient(cryptoComRestOptions);
395+
DeepCoin = new DeepCoinRestClient(deepCoinRestOptions);
386396
GateIo = new GateIoRestClient(gateIoRestOptions);
387397
HTX = new HTXRestClient(htxRestOptions);
388398
HyperLiquid = new HyperLiquidRestClient(hyperLiquidRestOptions);
@@ -437,6 +447,7 @@ private void InitSharedClients()
437447
CoinEx.SpotApiV2.SharedClient,
438448
CoinEx.FuturesApi.SharedClient,
439449
CryptoCom.ExchangeApi.SharedClient,
450+
DeepCoin.ExchangeApi.SharedClient,
440451
GateIo.SpotApi.SharedClient,
441452
GateIo.PerpetualFuturesApi.SharedClient,
442453
HTX.SpotApi.SharedClient,
@@ -470,6 +481,7 @@ public ExchangeRestClient(
470481
ICoinbaseRestClient coinbase,
471482
ICoinExRestClient coinEx,
472483
ICryptoComRestClient cryptoCom,
484+
IDeepCoinRestClient deepCoin,
473485
IGateIoRestClient gateIo,
474486
IHTXRestClient htx,
475487
IHyperLiquidRestClient hyperLiquid,
@@ -493,6 +505,7 @@ public ExchangeRestClient(
493505
Coinbase = coinbase;
494506
CoinEx = coinEx;
495507
CryptoCom = cryptoCom;
508+
DeepCoin = deepCoin;
496509
GateIo = gateIo;
497510
HTX = htx;
498511
HyperLiquid = hyperLiquid;
@@ -542,6 +555,7 @@ public void SetApiCredentials(string exchange, string apiKey, string apiSecret,
542555
case "Coinbase": Coinbase.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
543556
case "CoinEx": CoinEx.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
544557
case "CryptoCom": CryptoCom.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
558+
case "DeepCoin": DeepCoin.SetApiCredentials(new DeepCoinApiCredentials(apiKey, apiSecret, apiPass ?? throw new ArgumentException("ApiPass required for DeepCoin credentials", nameof(apiPass)))); break;
545559
case "GateIo": GateIo.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
546560
case "HTX": HTX.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
547561
case "HyperLiquid": HyperLiquid.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;

CryptoClients.Net/ExchangeSocketClient.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
using CryptoExchange.Net.Objects.Options;
3838
using CryptoExchange.Net.Objects.Sockets;
3939
using CryptoExchange.Net.SharedApis;
40+
using DeepCoin.Net.Clients;
41+
using DeepCoin.Net.Interfaces.Clients;
42+
using DeepCoin.Net.Objects;
43+
using DeepCoin.Net.Objects.Options;
4044
using GateIo.Net.Clients;
4145
using GateIo.Net.Interfaces.Clients;
4246
using GateIo.Net.Objects.Options;
@@ -100,6 +104,8 @@ public class ExchangeSocketClient : IExchangeSocketClient
100104
/// <inheritdoc />
101105
public ICryptoComSocketClient CryptoCom { get; }
102106
/// <inheritdoc />
107+
public IDeepCoinSocketClient DeepCoin { get; }
108+
/// <inheritdoc />
103109
public IGateIoSocketClient GateIo { get; }
104110
/// <inheritdoc />
105111
public IHTXSocketClient HTX { get; }
@@ -208,6 +214,7 @@ public ExchangeSocketClient()
208214
Coinbase = new CoinbaseSocketClient();
209215
CoinEx = new CoinExSocketClient();
210216
CryptoCom = new CryptoComSocketClient();
217+
DeepCoin = new DeepCoinSocketClient();
211218
GateIo = new GateIoSocketClient();
212219
HTX = new HTXSocketClient();
213220
HyperLiquid = new HyperLiquidSocketClient();
@@ -236,6 +243,7 @@ public ExchangeSocketClient(
236243
Action<CoinExSocketOptions>? coinExSocketOptions = null,
237244
Action<CoinbaseSocketOptions>? coinbaseSocketOptions = null,
238245
Action<CryptoComSocketOptions>? cryptoComSocketOptions = null,
246+
Action<DeepCoinSocketOptions>? deepCoinSocketOptions = null,
239247
Action<GateIoSocketOptions>? gateIoSocketOptions = null,
240248
Action<HTXSocketOptions>? htxSocketOptions = null,
241249
Action<HyperLiquidSocketOptions>? hyperLiquidSocketOptions = null,
@@ -280,6 +288,7 @@ Action<TOptions> SetGlobalSocketOptions<TOptions, TCredentials>(GlobalExchangeOp
280288
coinbaseSocketOptions = SetGlobalSocketOptions(global, coinbaseSocketOptions, credentials?.Coinbase);
281289
coinExSocketOptions = SetGlobalSocketOptions(global, coinExSocketOptions, credentials?.CoinEx);
282290
cryptoComSocketOptions = SetGlobalSocketOptions(global, cryptoComSocketOptions, credentials?.CryptoCom);
291+
deepCoinSocketOptions = SetGlobalSocketOptions(global, deepCoinSocketOptions, credentials?.DeepCoin);
283292
gateIoSocketOptions = SetGlobalSocketOptions(global, gateIoSocketOptions, credentials?.GateIo);
284293
htxSocketOptions = SetGlobalSocketOptions(global, htxSocketOptions, credentials?.HTX);
285294
hyperLiquidSocketOptions = SetGlobalSocketOptions(global, hyperLiquidSocketOptions, credentials?.HyperLiquid);
@@ -303,6 +312,7 @@ Action<TOptions> SetGlobalSocketOptions<TOptions, TCredentials>(GlobalExchangeOp
303312
HTX = new HTXSocketClient(htxSocketOptions ?? new Action<HTXSocketOptions>((x) => { }));
304313
HyperLiquid = new HyperLiquidSocketClient(hyperLiquidSocketOptions ?? new Action<HyperLiquidSocketOptions>((x) => { }));
305314
CryptoCom = new CryptoComSocketClient(cryptoComSocketOptions ?? new Action<CryptoComSocketOptions>((x) => { }));
315+
DeepCoin = new DeepCoinSocketClient(deepCoinSocketOptions ?? new Action<DeepCoinSocketOptions>((x) => { }));
306316
GateIo = new GateIoSocketClient(gateIoSocketOptions ?? new Action<GateIoSocketOptions>((x) => { }));
307317
Kraken = new KrakenSocketClient(krakenSocketOptions ?? new Action<KrakenSocketOptions>((x) => { }));
308318
Kucoin = new KucoinSocketClient(kucoinSocketOptions ?? new Action<KucoinSocketOptions>((x) => { }));
@@ -328,6 +338,7 @@ public ExchangeSocketClient(
328338
ICoinbaseSocketClient coinbase,
329339
ICoinExSocketClient coinEx,
330340
ICryptoComSocketClient cryptoCom,
341+
IDeepCoinSocketClient deepCoin,
331342
IGateIoSocketClient gateIo,
332343
IHTXSocketClient htx,
333344
IHyperLiquidSocketClient hyperLiquid,
@@ -348,6 +359,7 @@ public ExchangeSocketClient(
348359
Coinbase = coinbase;
349360
CoinEx = coinEx;
350361
CryptoCom = cryptoCom;
362+
DeepCoin = deepCoin;
351363
GateIo = gateIo;
352364
HTX = htx;
353365
HyperLiquid = hyperLiquid;
@@ -384,6 +396,7 @@ private void InitSharedClients()
384396
CoinEx.SpotApiV2.SharedClient,
385397
CoinEx.FuturesApi.SharedClient,
386398
CryptoCom.ExchangeApi.SharedClient,
399+
DeepCoin.ExchangeApi.SharedClient,
387400
GateIo.SpotApi.SharedClient,
388401
GateIo.PerpetualFuturesApi.SharedClient,
389402
HTX.SpotApi.SharedClient,
@@ -426,6 +439,7 @@ public void SetApiCredentials(string exchange, string apiKey, string apiSecret,
426439
case "Coinbase": Coinbase.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
427440
case "CoinEx": CoinEx.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
428441
case "CryptoCom": CryptoCom.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
442+
case "DeepCoin": DeepCoin.SetApiCredentials(new DeepCoinApiCredentials(apiKey, apiSecret, apiPass ?? throw new ArgumentException("ApiPass required for DeepCoin credentials", nameof(apiPass)))); break;
429443
case "GateIo": GateIo.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
430444
case "HTX": HTX.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
431445
case "HyperLiquid": HyperLiquid.SetApiCredentials(new ApiCredentials(apiKey, apiSecret)); break;
@@ -648,6 +662,7 @@ public async Task UnsubscribeAllAsync()
648662
Coinbase.UnsubscribeAllAsync(),
649663
CoinEx.UnsubscribeAllAsync(),
650664
CryptoCom.UnsubscribeAllAsync(),
665+
DeepCoin.UnsubscribeAllAsync(),
651666
GateIo.UnsubscribeAllAsync(),
652667
HTX.UnsubscribeAllAsync(),
653668
HyperLiquid.UnsubscribeAllAsync(),

CryptoClients.Net/ExchangeTrackerFactory.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using CryptoExchange.Net.SharedApis;
1515
using CryptoExchange.Net.Trackers.Klines;
1616
using CryptoExchange.Net.Trackers.Trades;
17+
using DeepCoin.Net.Interfaces;
1718
using GateIo.Net.Interfaces;
1819
using HTX.Net.Interfaces;
1920
using HyperLiquid.Net.Interfaces;
@@ -52,6 +53,8 @@ public class ExchangeTrackerFactory : IExchangeTrackerFactory
5253
/// <inheritdoc />
5354
public ICryptoComTrackerFactory CryptoCom { get; }
5455
/// <inheritdoc />
56+
public IDeepCoinTrackerFactory DeepCoin { get; }
57+
/// <inheritdoc />
5558
public IGateIoTrackerFactory GateIo { get; }
5659
/// <inheritdoc />
5760
public IHTXTrackerFactory HTX { get; }
@@ -84,6 +87,7 @@ public ExchangeTrackerFactory(
8487
ICoinbaseTrackerFactory coinbase,
8588
ICoinExTrackerFactory coinEx,
8689
ICryptoComTrackerFactory cryptoCom,
90+
IDeepCoinTrackerFactory deepCoin,
8791
IGateIoTrackerFactory gateIo,
8892
IHTXTrackerFactory htx,
8993
IHyperLiquidTrackerFactory hyperLiquid,
@@ -104,6 +108,7 @@ public ExchangeTrackerFactory(
104108
Coinbase = coinbase;
105109
CoinEx = coinEx;
106110
CryptoCom = cryptoCom;
111+
DeepCoin = deepCoin;
107112
GateIo = gateIo;
108113
HTX = htx;
109114
HyperLiquid = hyperLiquid;
@@ -143,6 +148,8 @@ public ExchangeTrackerFactory(
143148
return null;
144149
case "CryptoCom":
145150
return CryptoCom.CreateKlineTracker(symbol, interval, limit, period);
151+
case "DeepCoin":
152+
return DeepCoin.CreateKlineTracker(symbol, interval, limit, period);
146153
case "GateIo":
147154
return GateIo.CreateKlineTracker(symbol, interval, limit, period);
148155
case "HTX":
@@ -193,6 +200,8 @@ public ExchangeTrackerFactory(
193200
return CoinEx.CreateTradeTracker(symbol, limit, period);
194201
case "CryptoCom":
195202
return CryptoCom.CreateTradeTracker(symbol, limit, period);
203+
case "DeepCoin":
204+
return DeepCoin.CreateTradeTracker(symbol, limit, period);
196205
case "GateIo":
197206
return GateIo.CreateTradeTracker(symbol, limit, period);
198207
case "HTX":

0 commit comments

Comments
 (0)