Bittrex GetDepositHistory method return new DepositHistory struct type (#417)

This commit is contained in:
Vazha
2020-01-15 23:10:07 +02:00
committed by Adrian Gallagher
parent 26b8e95eb0
commit 838b378c21
2 changed files with 17 additions and 2 deletions

View File

@@ -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 == " ") {

View File

@@ -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"`
}