diff --git a/src/Bittrex.Api.Client/BittrexClient.cs b/src/Bittrex.Api.Client/BittrexClient.cs index b845642..3509768 100644 --- a/src/Bittrex.Api.Client/BittrexClient.cs +++ b/src/Bittrex.Api.Client/BittrexClient.cs @@ -338,6 +338,51 @@ public async Task> GetOrder(Guid uuid) return JsonConvert.DeserializeObject>(json); } + /// + /// Used to retrieve your deposit history. + /// + /// Optional a string literal for the currency (ie. BTC). If omitted, will return for all currencies + /// + public async Task> GetDepositHistory(String currencyName = null) + { + var nonce = GenerateNonce(); + + var url = $"{_accountBaseUrl}/getdeposithistory?apiKey={_apiKey}&nonce={nonce}"; + + if (currencyName != null) + { + url += $"¤cy={currencyName}"; + } + + var json = await GetPrivateAsync(url, _apiSecret) + .ConfigureAwait(false); + + + return JsonConvert.DeserializeObject>(json); + } + + /// + /// Used to retrieve your withdrawal history. + /// + /// Optional a string literal for the currency (ie. BTC). If omitted, will return for all currencies + /// + public async Task> GetWithdrawalHistory(String currencyName = null) + { + var nonce = GenerateNonce(); + + var url = $"{_accountBaseUrl}/getwithdrawalhistory?apiKey={_apiKey}&nonce={nonce}"; + + if (currencyName != null) + { + url += $"¤cy={currencyName}"; + } + + var json = await GetPrivateAsync(url, _apiSecret) + .ConfigureAwait(false); + + return JsonConvert.DeserializeObject>(json); + } + /// /// Execute a GET request for a public api end point /// diff --git a/src/Bittrex.Api.Client/Models/DepositHistory.cs b/src/Bittrex.Api.Client/Models/DepositHistory.cs new file mode 100644 index 0000000..128fada --- /dev/null +++ b/src/Bittrex.Api.Client/Models/DepositHistory.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; +using System; + +namespace Bittrex.Api.Client.Models +{ + public class DepositHistory + { + public int Id { get; set; } + public Decimal Amount { get; set; } + public String Currency { get; set; } + public int Confirmations { get; set; } + public DateTime LastUpdated { get; set; } + public String TxId { get; set; } + public String CryptoAddress { get; set; } + } +} diff --git a/src/Bittrex.Api.Client/Models/WithdrawalHistory.cs b/src/Bittrex.Api.Client/Models/WithdrawalHistory.cs new file mode 100644 index 0000000..b3e5d57 --- /dev/null +++ b/src/Bittrex.Api.Client/Models/WithdrawalHistory.cs @@ -0,0 +1,15 @@ +using System; + +namespace Bittrex.Api.Client.Models +{ + public class WithdrawalHistory + { + public int Id { get; set; } + public Decimal Amount { get; set; } + public String Currency { get; set; } + public int Confirmations { get; set; } + public DateTime LastUpdated { get; set; } + public String TxId { get; set; } + public String CryptoAddress { get; set; } + } +}