Deposit address wrapper Update (#232)

* Add get deposit address and fix authentication issue for ZB exchange

*  Add get deposit address for Yobit exchange

* Add get deposit address for Poloniex exchange

* Add get deposit address for LocalBitcoins exchange

* Remove support for deposit address on Liqui exchange

*  Add get deposit address for LakeBTC exchange

* Add notes as to the reason of non implementation

* Add get deposit address for Kraken exchange

* Add get deposit address for HitBTC exchange

*  Add get deposit address for GateIO exchange

* Add get deposit address for Exmo exchange

*  Remove support for deposit address on Coinut exchange

* Add test case for BTC Markets function still not supported yet.

*  Add get deposit address for Bittrex exchange

* Add get deposit address for Bitstamp exchange

* Add get deposit address for Bitmex exchange
Rm unused swagger.json file in Bitmex exchange

* Add get deposit address for Bithumb exchange

* Add get deposit address for Binance exchange
Fix bug in Authenticated requests, concatenates sig string on end of query

* Remove support for deposit address on ANX exchange

* Updated account type to segregate multiple accounts on an exchange.

* Fix requested changes

* Add get deposit address for Bitfinex exchange
Add parameter for getting deposit address to wrapper

* Add get deposit address for ANX exchange

* Fix misspelling in Poloniex

* Drop working field and initialisation of zero value for Account Type

* Change switch to symbol package currency code
This commit is contained in:
Ryan O'Hara-Reid
2019-01-17 11:44:23 +11:00
committed by Adrian Gallagher
parent 88303b81ab
commit 84a67359c9
75 changed files with 1234 additions and 6559 deletions

View File

@@ -406,3 +406,10 @@ func TestWithdrawInternationalBank(t *testing.T) {
t.Errorf("Expected '%v', recieved: '%v'", common.ErrFunctionNotSupported, err)
}
}
func TestGetDepositAddress(t *testing.T) {
_, err := i.GetDepositAddress(symbol.BTC, "")
if err == nil {
t.Error("Test Failed - GetDepositAddress() error cannot be nil")
}
}

View File

@@ -111,7 +111,7 @@ func (i *ItBit) UpdateOrderbook(p pair.CurrencyPair, assetType string) (orderboo
// GetAccountInfo retrieves balances for all enabled currencies
func (i *ItBit) GetAccountInfo() (exchange.AccountInfo, error) {
var info exchange.AccountInfo
info.ExchangeName = i.GetName()
info.Exchange = i.GetName()
wallets, err := i.GetWallets(url.Values{})
if err != nil {
@@ -146,6 +146,10 @@ func (i *ItBit) GetAccountInfo() (exchange.AccountInfo, error) {
})
}
info.Accounts = append(info.Accounts, exchange.Account{
Currencies: fullBalance,
})
return info, nil
}
@@ -237,7 +241,10 @@ func (i *ItBit) GetOrderInfo(orderID int64) (exchange.OrderDetail, error) {
}
// GetDepositAddress returns a deposit address for a specified currency
func (i *ItBit) GetDepositAddress(cryptocurrency pair.CurrencyItem) (string, error) {
// NOTE: This has not been implemented due to the fact you need to generate a
// a specific wallet ID and they restrict the amount of deposit address you can
// request limiting them to 2.
func (i *ItBit) GetDepositAddress(cryptocurrency pair.CurrencyItem, accountID string) (string, error) {
return "", common.ErrNotYetImplemented
}