From 838b378c2117b1f04db4225b294e77d05e004c9c Mon Sep 17 00:00:00 2001 From: Vazha Date: Wed, 15 Jan 2020 23:10:07 +0200 Subject: [PATCH] Bittrex GetDepositHistory method return new DepositHistory struct type (#417) --- exchanges/bittrex/bittrex.go | 4 ++-- exchanges/bittrex/bittrex_types.go | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/exchanges/bittrex/bittrex.go b/exchanges/bittrex/bittrex.go index a564dd16..70a64a53 100644 --- a/exchanges/bittrex/bittrex.go +++ b/exchanges/bittrex/bittrex.go @@ -408,8 +408,8 @@ func (b *Bittrex) GetWithdrawalHistory(currency string) (WithdrawalHistory, erro // GetDepositHistory is used to retrieve your deposit history. If currency is // is omitted it will return the entire deposit history -func (b *Bittrex) GetDepositHistory(currency string) (WithdrawalHistory, error) { - var history WithdrawalHistory +func (b *Bittrex) GetDepositHistory(currency string) (DepositHistory, error) { + var history DepositHistory values := url.Values{} if !(currency == "" || currency == " ") { diff --git a/exchanges/bittrex/bittrex_types.go b/exchanges/bittrex/bittrex_types.go index be400fd5..b4364fc2 100644 --- a/exchanges/bittrex/bittrex_types.go +++ b/exchanges/bittrex/bittrex_types.go @@ -209,3 +209,18 @@ type WithdrawalHistory struct { InvalidAddress bool `json:"InvalidAddress"` } `json:"result"` } + +// DepositHistory holds the Deposit history data +type DepositHistory struct { + Success bool `json:"success"` + Message string `json:"message"` + Result []struct { + Id string `json:"Id"` + Amount float64 `json:"Amount"` + Currency string `json:"Currency"` + Confirmations int `json:"Confirmations"` + LastUpdated string `json:"LastUpdated"` + TxID string `json:"TxId"` + CryptoAddress string `json:"CryptoAddress"` + } `json:"result"` +} \ No newline at end of file