From 6999cec305d28a12d058724e51948f81d4ca1a9e Mon Sep 17 00:00:00 2001 From: nils2525 Date: Tue, 4 Feb 2025 14:17:21 +0100 Subject: [PATCH 1/2] Added method to retrieve all deposit and withdrawal configurations --- .../SpotApiV2/CoinExRestClientSpotApiAccount.cs | 14 ++++++++++---- .../SpotApiV2/ICoinExRestClientSpotApiAccount.cs | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CoinEx.Net/Clients/SpotApiV2/CoinExRestClientSpotApiAccount.cs b/CoinEx.Net/Clients/SpotApiV2/CoinExRestClientSpotApiAccount.cs index 18467be..1a71de1 100644 --- a/CoinEx.Net/Clients/SpotApiV2/CoinExRestClientSpotApiAccount.cs +++ b/CoinEx.Net/Clients/SpotApiV2/CoinExRestClientSpotApiAccount.cs @@ -1,12 +1,12 @@ using CoinEx.Net.Enums; +using CoinEx.Net.Interfaces.Clients.SpotApiV2; +using CoinEx.Net.Objects.Models.V2; using CryptoExchange.Net.Objects; +using System; using System.Collections.Generic; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using CoinEx.Net.Objects.Models.V2; -using CoinEx.Net.Interfaces.Clients.SpotApiV2; -using System; namespace CoinEx.Net.Clients.SpotApiV2 { @@ -199,7 +199,13 @@ public async Task> GetDepositWithdr { var parameters = new ParameterCollection(); parameters.AddOptional("ccy", asset); - return await _baseClient.ExecuteAsync(_baseClient.GetUri("v2/assets/deposit-withdraw-config"), HttpMethod.Get, ct, parameters, true).ConfigureAwait(false); + return await _baseClient.ExecuteAsync(_baseClient.GetUri("v2/assets/deposit-withdraw-config"), HttpMethod.Get, ct, parameters, false).ConfigureAwait(false); + } + + /// + public async Task>> GetAllDepositWithdrawalConfigsAsync(CancellationToken ct = default) + { + return await _baseClient.ExecuteAsync>(_baseClient.GetUri("v2/assets/all-deposit-withdraw-config"), HttpMethod.Get, ct, null, false).ConfigureAwait(false); } /// diff --git a/CoinEx.Net/Interfaces/Clients/SpotApiV2/ICoinExRestClientSpotApiAccount.cs b/CoinEx.Net/Interfaces/Clients/SpotApiV2/ICoinExRestClientSpotApiAccount.cs index 83de263..73591dc 100644 --- a/CoinEx.Net/Interfaces/Clients/SpotApiV2/ICoinExRestClientSpotApiAccount.cs +++ b/CoinEx.Net/Interfaces/Clients/SpotApiV2/ICoinExRestClientSpotApiAccount.cs @@ -198,6 +198,14 @@ public interface ICoinExRestClientSpotApiAccount /// Task> GetDepositWithdrawalConfigAsync(string asset, CancellationToken ct = default); + /// + /// Get withdraw and deposit information for all assets + /// + /// + /// Cancelation token + /// + Task>> GetAllDepositWithdrawalConfigsAsync(CancellationToken ct = default); + /// /// Transfer between accounts /// From 8e60e84ec7bc599799a8382dbeb630699419f884 Mon Sep 17 00:00:00 2001 From: nils2525 Date: Tue, 4 Feb 2025 14:17:41 +0100 Subject: [PATCH 2/2] updated CoinEx.Net.xml --- CoinEx.Net/CoinEx.Net.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CoinEx.Net/CoinEx.Net.xml b/CoinEx.Net/CoinEx.Net.xml index 1062cb2..5594e1a 100644 --- a/CoinEx.Net/CoinEx.Net.xml +++ b/CoinEx.Net/CoinEx.Net.xml @@ -680,6 +680,9 @@ + + + @@ -3181,6 +3184,14 @@ Cancelation token + + + Get withdraw and deposit information for all assets + + + Cancelation token + + Transfer between accounts