Skip to content

Commit 42bda6a

Browse files
mj.akbarimjal146
authored andcommitted
update exchange library and change target dotnet version to dotnet standard, fix missing some code and refrence
1 parent fd4bce1 commit 42bda6a

68 files changed

Lines changed: 374 additions & 171 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 13 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
4+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
55

66
# User-specific files
77
*.rsuser
@@ -13,24 +13,20 @@
1313
# User-specific files (MonoDevelop/Xamarin Studio)
1414
*.userprefs
1515

16-
# Mono auto generated files
17-
mono_crash.*
18-
1916
# Build results
2017
[Dd]ebug/
2118
[Dd]ebugPublic/
2219
[Rr]elease/
2320
[Rr]eleases/
2421
x64/
2522
x86/
26-
[Ww][Ii][Nn]32/
2723
[Aa][Rr][Mm]/
2824
[Aa][Rr][Mm]64/
2925
bld/
3026
[Bb]in/
3127
[Oo]bj/
3228
[Ll]og/
33-
[Ll]ogs/
29+
Files/
3430

3531
# Visual Studio 2015/2017 cache/options directory
3632
.vs/
@@ -44,10 +40,9 @@ Generated\ Files/
4440
[Tt]est[Rr]esult*/
4541
[Bb]uild[Ll]og.*
4642

47-
# NUnit
43+
# NUNIT
4844
*.VisualState.xml
4945
TestResult.xml
50-
nunit-*.xml
5146

5247
# Build Results of an ATL Project
5348
[Dd]ebugPS/
@@ -57,14 +52,12 @@ dlldata.c
5752
# Benchmark Results
5853
BenchmarkDotNet.Artifacts/
5954

55+
fail-*.txt
6056
# .NET Core
6157
project.lock.json
6258
project.fragment.lock.json
6359
artifacts/
6460

65-
# ASP.NET Scaffolding
66-
ScaffoldingReadMe.txt
67-
6861
# StyleCop
6962
StyleCopReport.xml
7063

@@ -90,7 +83,6 @@ StyleCopReport.xml
9083
*.tmp_proj
9184
*_wpftmp.csproj
9285
*.log
93-
*.tlog
9486
*.vspscc
9587
*.vssscc
9688
.builds
@@ -132,6 +124,9 @@ _ReSharper*/
132124
*.[Rr]e[Ss]harper
133125
*.DotSettings.user
134126

127+
# JustCode is a .NET coding add-in
128+
.JustCode
129+
135130
# TeamCity is a build add-in
136131
_TeamCity*
137132

@@ -142,11 +137,6 @@ _TeamCity*
142137
.axoCover/*
143138
!.axoCover/settings.json
144139

145-
# Coverlet is a free, cross platform Code Coverage Tool
146-
coverage*.json
147-
coverage*.xml
148-
coverage*.info
149-
150140
# Visual Studio code coverage results
151141
*.coverage
152142
*.coveragexml
@@ -194,8 +184,6 @@ PublishScripts/
194184

195185
# NuGet Packages
196186
*.nupkg
197-
# NuGet Symbol Packages
198-
*.snupkg
199187
# The packages folder can be ignored because of Package Restore
200188
**/[Pp]ackages/*
201189
# except build/, which is used as an MSBuild target.
@@ -220,8 +208,6 @@ BundleArtifacts/
220208
Package.StoreAssociation.xml
221209
_pkginfo.txt
222210
*.appx
223-
*.appxbundle
224-
*.appxupload
225211

226212
# Visual Studio cache files
227213
# files ending in .cache can be ignored
@@ -271,9 +257,7 @@ ServiceFabricBackup/
271257
*.bim.layout
272258
*.bim_*.settings
273259
*.rptproj.rsuser
274-
*- [Bb]ackup.rdl
275-
*- [Bb]ackup ([0-9]).rdl
276-
*- [Bb]ackup ([0-9][0-9]).rdl
260+
*- Backup*.rdl
277261

278262
# Microsoft Fakes
279263
FakesAssemblies/
@@ -294,17 +278,6 @@ node_modules/
294278
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295279
*.vbw
296280

297-
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
298-
*.vbp
299-
300-
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
301-
*.dsw
302-
*.dsp
303-
304-
# Visual Studio 6 technical files
305-
*.ncb
306-
*.aps
307-
308281
# Visual Studio LightSwitch build output
309282
**/*.HTMLClient/GeneratedArtifacts
310283
**/*.DesktopClient/GeneratedArtifacts
@@ -320,6 +293,10 @@ paket-files/
320293
# FAKE - F# Make
321294
.fake/
322295

296+
# JetBrains Rider
297+
.idea/
298+
*.sln.iml
299+
323300
# CodeRush personal settings
324301
.cr/personal
325302

@@ -361,38 +338,5 @@ ASALocalRun/
361338
# Local History for Visual Studio
362339
.localhistory/
363340

364-
# Visual Studio History (VSHistory) files
365-
.vshistory/
366-
367341
# BeatPulse healthcheck temp database
368-
healthchecksdb
369-
370-
# Backup folder for Package Reference Convert tool in Visual Studio 2017
371-
MigrationBackup/
372-
373-
# Ionide (cross platform F# VS Code tools) working folder
374-
.ionide/
375-
376-
# Fody - auto-generated XML schema
377-
FodyWeavers.xsd
378-
379-
# VS Code files for those working on multiple tools
380-
.vscode/*
381-
!.vscode/settings.json
382-
!.vscode/tasks.json
383-
!.vscode/launch.json
384-
!.vscode/extensions.json
385-
*.code-workspace
386-
387-
# Local History for Visual Studio Code
388-
.history/
389-
390-
# Windows Installer files from build outputs
391-
*.cab
392-
*.msi
393-
*.msix
394-
*.msm
395-
*.msp
396-
397-
# JetBrains Rider
398-
*.sln.iml
342+
healthchecksdb

src/Clients/MexcRestClient.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
using Mexc.Net.Clients.SpotApi;
1+
using System;
2+
using System.Net.Http;
3+
using CryptoExchange.Net;
4+
using Mexc.Net.Clients.SpotApi;
25
using Mexc.Net.Interfaces.Clients;
36
using Mexc.Net.Interfaces.Clients.SpotApi;
47
using Mexc.Net.Objects;
58
using Mexc.Net.Objects.Options;
6-
using Microsoft.Extensions.Options;
9+
using Microsoft.Extensions.Logging;
710

811
namespace Mexc.Net.Clients;
912

src/Clients/MexcSocketClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
using Mexc.Net.Clients.SpotApi;
1+
using System;
2+
using CryptoExchange.Net;
3+
using Mexc.Net.Clients.SpotApi;
24
using Mexc.Net.Interfaces.Clients;
35
using Mexc.Net.Interfaces.Clients.SpotApi;
46
using Mexc.Net.Objects;
57
using Mexc.Net.Objects.Options;
8+
using Microsoft.Extensions.Logging;
69

710
namespace Mexc.Net.Clients;
811

src/Clients/SpotApi/MexcClientSpotApi.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
using CryptoExchange.Net.CommonObjects;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Net.Http;
6+
using System.Threading;
7+
using System.Threading.Tasks;
8+
using CryptoExchange.Net;
9+
using CryptoExchange.Net.Authentication;
10+
using CryptoExchange.Net.CommonObjects;
211
using CryptoExchange.Net.Interfaces.CommonClients;
12+
using CryptoExchange.Net.Objects;
313
using Mexc.Net.Converters;
414
using Mexc.Net.Enums;
515
using Mexc.Net.Interfaces.Clients.SpotApi;
616
using Mexc.Net.Objects;
717
using Mexc.Net.Objects.Internal;
818
using Mexc.Net.Objects.Models;
919
using Mexc.Net.Objects.Options;
20+
using Microsoft.Extensions.Logging;
21+
using Newtonsoft.Json;
1022

1123
namespace Mexc.Net.Clients.SpotApi;
1224

src/Clients/SpotApi/MexcClientSpotApiAccount.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
using Mexc.Net.Interfaces.Clients.SpotApi;
1+
using System.Collections.Generic;
2+
using System.Net.Http;
3+
using System.Threading;
4+
using System.Threading.Tasks;
5+
using CryptoExchange.Net.Objects;
6+
using Mexc.Net.Interfaces.Clients.SpotApi;
27
using Mexc.Net.Objects.Models;
38

49
namespace Mexc.Net.Clients.SpotApi;

src/Clients/SpotApi/MexcClientSpotApiExchangeData.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
using Mexc.Net.Converters;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Net.Http;
6+
using System.Threading;
7+
using System.Threading.Tasks;
8+
using CryptoExchange.Net;
9+
using CryptoExchange.Net.Converters;
10+
using CryptoExchange.Net.Objects;
11+
using Mexc.Net.Converters;
212
using Mexc.Net.Enums;
313
using Mexc.Net.Interfaces.Clients;
414
using Mexc.Net.Interfaces.Clients.SpotApi;
515
using Mexc.Net.Objects.Models;
16+
using Newtonsoft.Json;
617

718
namespace Mexc.Net.Clients.SpotApi;
819

src/Clients/SpotApi/MexcClientSpotApiTrading.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
using CryptoExchange.Net.CommonObjects;
2-
using Mexc.NET.Enums;
3-
using Mexc.NET.Interfaces.Clients.SpotApi;
4-
using Mexc.NET.Objects.Models;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Net.Http;
5+
using System.Threading;
6+
using System.Threading.Tasks;
7+
using CryptoExchange.Net;
8+
using CryptoExchange.Net.CommonObjects;
9+
using CryptoExchange.Net.Objects;
10+
using Mexc.Net;
11+
using Mexc.Net.Clients.SpotApi;
12+
using Mexc.Net.Enums;
13+
using Mexc.Net.Interfaces.Clients.SpotApi;
14+
using Mexc.Net.Objects.Models;
515

616
namespace Mexc.NET.Clients.SpotApi;
717

src/Clients/SpotApi/MexcSocketClientSpotStreams.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
using CryptoExchange.Net.Sockets;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Threading;
6+
using System.Threading.Tasks;
7+
using CryptoExchange.Net;
8+
using CryptoExchange.Net.Authentication;
9+
using CryptoExchange.Net.Objects;
10+
using CryptoExchange.Net.Sockets;
211
using Mexc.Net.Converters;
312
using Mexc.Net.Enums;
413
using Mexc.Net.Interfaces.Clients.SpotApi;
@@ -7,6 +16,9 @@
716
using Mexc.Net.Objects.Models;
817
using Mexc.Net.Objects.Models.Spot.Socket;
918
using Mexc.Net.Objects.Options;
19+
using Microsoft.Extensions.Logging;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Linq;
1022

1123
namespace Mexc.Net.Clients.SpotApi;
1224

@@ -77,7 +89,7 @@ internal async Task<CallResult<UpdateSubscription>> SubscribeAsync<T>(string url
7789
{
7890
Method = "SUBSCRIPTION",
7991
Params = topics.ToArray(),
80-
Id = CryptoExchange.Net.ExchangeHelpers.NextId()
92+
Id = ExchangeHelpers.NextId()
8193
};
8294

8395
return await SubscribeAsync(url, request, null, false, onData, ct);

0 commit comments

Comments
 (0)