diff --git a/exchanges/alphapoint/alphapoint_wrapper.go b/exchanges/alphapoint/alphapoint_wrapper.go index 127433f3..c04efa7a 100644 --- a/exchanges/alphapoint/alphapoint_wrapper.go +++ b/exchanges/alphapoint/alphapoint_wrapper.go @@ -213,11 +213,6 @@ func (a *Alphapoint) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, erro return 0, common.ErrFunctionNotSupported } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (a *Alphapoint) GetWithdrawCapabilities() uint32 { - return a.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open // This function is not concurrency safe due to orderSide/orderType maps func (a *Alphapoint) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { diff --git a/exchanges/anx/anx_wrapper.go b/exchanges/anx/anx_wrapper.go index fa018dc3..c74b2c48 100644 --- a/exchanges/anx/anx_wrapper.go +++ b/exchanges/anx/anx_wrapper.go @@ -343,11 +343,6 @@ func (a *ANX) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return a.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (a *ANX) GetWithdrawCapabilities() uint32 { - return a.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (a *ANX) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := a.GetOrderList(true) diff --git a/exchanges/binance/binance_wrapper.go b/exchanges/binance/binance_wrapper.go index 75c0a658..17997efc 100644 --- a/exchanges/binance/binance_wrapper.go +++ b/exchanges/binance/binance_wrapper.go @@ -304,11 +304,6 @@ func (b *Binance) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) return b.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Binance) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *Binance) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { if len(getOrdersRequest.Currencies) <= 0 { diff --git a/exchanges/bitfinex/bitfinex_wrapper.go b/exchanges/bitfinex/bitfinex_wrapper.go index 4f6d8d94..013118dd 100644 --- a/exchanges/bitfinex/bitfinex_wrapper.go +++ b/exchanges/bitfinex/bitfinex_wrapper.go @@ -304,11 +304,6 @@ func (b *Bitfinex) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) return b.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Bitfinex) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *Bitfinex) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var orders []exchange.OrderDetail diff --git a/exchanges/bitflyer/bitflyer_wrapper.go b/exchanges/bitflyer/bitflyer_wrapper.go index 352ace21..ad555a6c 100644 --- a/exchanges/bitflyer/bitflyer_wrapper.go +++ b/exchanges/bitflyer/bitflyer_wrapper.go @@ -211,11 +211,6 @@ func (b *Bitflyer) GetWebsocket() (*exchange.Websocket, error) { return nil, common.ErrNotYetImplemented } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Bitflyer) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *Bitflyer) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { return nil, common.ErrNotYetImplemented diff --git a/exchanges/bithumb/bithumb_wrapper.go b/exchanges/bithumb/bithumb_wrapper.go index 4cbbb05a..6eb88186 100644 --- a/exchanges/bithumb/bithumb_wrapper.go +++ b/exchanges/bithumb/bithumb_wrapper.go @@ -304,11 +304,6 @@ func (b *Bithumb) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) return b.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Bithumb) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *Bithumb) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var orders []exchange.OrderDetail diff --git a/exchanges/bitmex/bitmex_wrapper.go b/exchanges/bitmex/bitmex_wrapper.go index 5f9e8242..8c22cc66 100644 --- a/exchanges/bitmex/bitmex_wrapper.go +++ b/exchanges/bitmex/bitmex_wrapper.go @@ -300,11 +300,6 @@ func (b *Bitmex) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return b.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Bitmex) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open // This function is not concurrency safe due to orderSide/orderType maps func (b *Bitmex) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { diff --git a/exchanges/bitstamp/bitstamp_wrapper.go b/exchanges/bitstamp/bitstamp_wrapper.go index e8c73b2d..fbd0de75 100644 --- a/exchanges/bitstamp/bitstamp_wrapper.go +++ b/exchanges/bitstamp/bitstamp_wrapper.go @@ -287,11 +287,6 @@ func (b *Bitstamp) GetWebsocket() (*exchange.Websocket, error) { return b.Websocket, nil } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Bitstamp) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *Bitstamp) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var orders []exchange.OrderDetail diff --git a/exchanges/bittrex/bittrex_wrapper.go b/exchanges/bittrex/bittrex_wrapper.go index 8c01a635..7329a13f 100644 --- a/exchanges/bittrex/bittrex_wrapper.go +++ b/exchanges/bittrex/bittrex_wrapper.go @@ -284,11 +284,6 @@ func (b *Bittrex) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *Bittrex) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *Bittrex) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var currPair string diff --git a/exchanges/btcc/btcc_wrapper.go b/exchanges/btcc/btcc_wrapper.go index bcbc2ae1..06558626 100644 --- a/exchanges/btcc/btcc_wrapper.go +++ b/exchanges/btcc/btcc_wrapper.go @@ -212,11 +212,6 @@ func (b *BTCC) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return b.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *BTCC) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *BTCC) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { return nil, common.ErrNotYetImplemented diff --git a/exchanges/btcmarkets/btcmarkets_wrapper.go b/exchanges/btcmarkets/btcmarkets_wrapper.go index 15e545c1..0a6614e6 100644 --- a/exchanges/btcmarkets/btcmarkets_wrapper.go +++ b/exchanges/btcmarkets/btcmarkets_wrapper.go @@ -306,11 +306,6 @@ func (b *BTCMarkets) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, erro return b.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (b *BTCMarkets) GetWithdrawCapabilities() uint32 { - return b.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (b *BTCMarkets) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := b.GetOpenOrders() diff --git a/exchanges/coinbasepro/coinbasepro_wrapper.go b/exchanges/coinbasepro/coinbasepro_wrapper.go index be2c4fe5..87258fd4 100644 --- a/exchanges/coinbasepro/coinbasepro_wrapper.go +++ b/exchanges/coinbasepro/coinbasepro_wrapper.go @@ -257,11 +257,6 @@ func (c *CoinbasePro) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, err return c.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (c *CoinbasePro) GetWithdrawCapabilities() uint32 { - return c.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (c *CoinbasePro) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var respOrders []GeneralizedOrderResponse diff --git a/exchanges/coinut/coinut_wrapper.go b/exchanges/coinut/coinut_wrapper.go index 71579120..21ceb223 100644 --- a/exchanges/coinut/coinut_wrapper.go +++ b/exchanges/coinut/coinut_wrapper.go @@ -380,11 +380,6 @@ func (c *COINUT) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return c.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (c *COINUT) GetWithdrawCapabilities() uint32 { - return c.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (c *COINUT) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { instruments, err := c.GetInstruments() diff --git a/exchanges/exchange.go b/exchanges/exchange.go index ec8e4ed6..710c31f2 100644 --- a/exchanges/exchange.go +++ b/exchanges/exchange.go @@ -322,12 +322,12 @@ type IBotExchange interface { GetOrderInfo(orderID int64) (OrderDetail, error) GetDepositAddress(cryptocurrency pair.CurrencyItem, accountID string) (string, error) - GetOrderHistory(GetOrdersRequest GetOrdersRequest) ([]OrderDetail, error) + GetOrderHistory(getOrdersRequest GetOrdersRequest) ([]OrderDetail, error) GetActiveOrders(getOrdersRequest GetOrdersRequest) ([]OrderDetail, error) - WithdrawCryptocurrencyFunds(wtihdrawRequest WithdrawRequest) (string, error) - WithdrawFiatFunds(wtihdrawRequest WithdrawRequest) (string, error) - WithdrawFiatFundsToInternationalBank(wtihdrawRequest WithdrawRequest) (string, error) + WithdrawCryptocurrencyFunds(withdrawRequest WithdrawRequest) (string, error) + WithdrawFiatFunds(withdrawRequest WithdrawRequest) (string, error) + WithdrawFiatFundsToInternationalBank(withdrawRequest WithdrawRequest) (string, error) GetWebsocket() (*Websocket, error) } diff --git a/exchanges/exmo/exmo_wrapper.go b/exchanges/exmo/exmo_wrapper.go index 02f0baa7..384b42dc 100644 --- a/exchanges/exmo/exmo_wrapper.go +++ b/exchanges/exmo/exmo_wrapper.go @@ -301,11 +301,6 @@ func (e *EXMO) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return e.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (e *EXMO) GetWithdrawCapabilities() uint32 { - return e.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (e *EXMO) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := e.GetOpenOrders() diff --git a/exchanges/gateio/gateio_wrapper.go b/exchanges/gateio/gateio_wrapper.go index 35b61ebe..1a4c5eb0 100644 --- a/exchanges/gateio/gateio_wrapper.go +++ b/exchanges/gateio/gateio_wrapper.go @@ -317,11 +317,6 @@ func (g *Gateio) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return g.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (g *Gateio) GetWithdrawCapabilities() uint32 { - return g.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (g *Gateio) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var currPair string diff --git a/exchanges/gemini/gemini_wrapper.go b/exchanges/gemini/gemini_wrapper.go index c0675dc0..2e2ee121 100644 --- a/exchanges/gemini/gemini_wrapper.go +++ b/exchanges/gemini/gemini_wrapper.go @@ -239,11 +239,6 @@ func (g *Gemini) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return g.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (g *Gemini) GetWithdrawCapabilities() uint32 { - return g.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (g *Gemini) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := g.GetOrders() diff --git a/exchanges/hitbtc/hitbtc_wrapper.go b/exchanges/hitbtc/hitbtc_wrapper.go index db47cadf..dd422d6c 100644 --- a/exchanges/hitbtc/hitbtc_wrapper.go +++ b/exchanges/hitbtc/hitbtc_wrapper.go @@ -263,11 +263,6 @@ func (h *HitBTC) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return h.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (h *HitBTC) GetWithdrawCapabilities() uint32 { - return h.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (h *HitBTC) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { if len(getOrdersRequest.Currencies) <= 0 { diff --git a/exchanges/huobi/huobi_wrapper.go b/exchanges/huobi/huobi_wrapper.go index 49156952..8de3ff90 100644 --- a/exchanges/huobi/huobi_wrapper.go +++ b/exchanges/huobi/huobi_wrapper.go @@ -372,11 +372,6 @@ func (h *HUOBI) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return h.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (h *HUOBI) GetWithdrawCapabilities() uint32 { - return h.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (h *HUOBI) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { if len(getOrdersRequest.Currencies) <= 0 { diff --git a/exchanges/huobihadax/huobihadax_wrapper.go b/exchanges/huobihadax/huobihadax_wrapper.go index 364b0140..eaca3514 100644 --- a/exchanges/huobihadax/huobihadax_wrapper.go +++ b/exchanges/huobihadax/huobihadax_wrapper.go @@ -337,11 +337,6 @@ func (h *HUOBIHADAX) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, erro return h.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (h *HUOBIHADAX) GetWithdrawCapabilities() uint32 { - return h.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (h *HUOBIHADAX) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { if len(getOrdersRequest.Currencies) <= 0 { diff --git a/exchanges/itbit/itbit_wrapper.go b/exchanges/itbit/itbit_wrapper.go index 4ae69260..5213e7d8 100644 --- a/exchanges/itbit/itbit_wrapper.go +++ b/exchanges/itbit/itbit_wrapper.go @@ -278,11 +278,6 @@ func (i *ItBit) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return i.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (i *ItBit) GetWithdrawCapabilities() uint32 { - return i.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (i *ItBit) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { wallets, err := i.GetWallets(url.Values{}) diff --git a/exchanges/kraken/kraken_wrapper.go b/exchanges/kraken/kraken_wrapper.go index 0184a642..d5133594 100644 --- a/exchanges/kraken/kraken_wrapper.go +++ b/exchanges/kraken/kraken_wrapper.go @@ -288,11 +288,6 @@ func (k *Kraken) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return k.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (k *Kraken) GetWithdrawCapabilities() uint32 { - return k.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (k *Kraken) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := k.GetOpenOrders(OrderInfoOptions{}) diff --git a/exchanges/lakebtc/lakebtc_wrapper.go b/exchanges/lakebtc/lakebtc_wrapper.go index 6619eebe..9c1ca889 100644 --- a/exchanges/lakebtc/lakebtc_wrapper.go +++ b/exchanges/lakebtc/lakebtc_wrapper.go @@ -261,11 +261,6 @@ func (l *LakeBTC) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) return l.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (l *LakeBTC) GetWithdrawCapabilities() uint32 { - return l.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (l *LakeBTC) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := l.GetOpenOrders() diff --git a/exchanges/localbitcoins/localbitcoins_wrapper.go b/exchanges/localbitcoins/localbitcoins_wrapper.go index f6bdbcf8..4e5f51f2 100644 --- a/exchanges/localbitcoins/localbitcoins_wrapper.go +++ b/exchanges/localbitcoins/localbitcoins_wrapper.go @@ -290,11 +290,6 @@ func (l *LocalBitcoins) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, e return l.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (l *LocalBitcoins) GetWithdrawCapabilities() uint32 { - return l.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (l *LocalBitcoins) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := l.GetDashboardInfo() diff --git a/exchanges/okcoin/okcoin_wrapper.go b/exchanges/okcoin/okcoin_wrapper.go index 7772ad9d..75b8e09b 100644 --- a/exchanges/okcoin/okcoin_wrapper.go +++ b/exchanges/okcoin/okcoin_wrapper.go @@ -42,7 +42,7 @@ func (o *OKCoin) Run() { prods, err := o.GetSpotInstruments() if err != nil { - log.Errorf("OKEX failed to obtain available spot instruments. Err: %d", err) + log.Errorf("OKEX failed to obtain available spot instruments. Err: %s", err) } else { var pairs []string for x := range prods { @@ -327,11 +327,6 @@ func (o *OKCoin) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return o.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (o *OKCoin) GetWithdrawCapabilities() uint32 { - return o.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (o *OKCoin) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var allOrders []OrderInfo diff --git a/exchanges/okex/okex_wrapper.go b/exchanges/okex/okex_wrapper.go index c1427eda..aec7a7ec 100644 --- a/exchanges/okex/okex_wrapper.go +++ b/exchanges/okex/okex_wrapper.go @@ -35,7 +35,7 @@ func (o *OKEX) Run() { prods, err := o.GetSpotInstruments() if err != nil { - log.Errorf("OKEX failed to obtain available spot instruments. Err: %d", err) + log.Errorf("OKEX failed to obtain available spot instruments. Err: %s", err) return } @@ -320,11 +320,6 @@ func (o *OKEX) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return o.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (o *OKEX) GetWithdrawCapabilities() uint32 { - return o.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (o *OKEX) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var allOrders []OrderInfo diff --git a/exchanges/poloniex/poloniex_wrapper.go b/exchanges/poloniex/poloniex_wrapper.go index e7d6fbb2..07b1fbe3 100644 --- a/exchanges/poloniex/poloniex_wrapper.go +++ b/exchanges/poloniex/poloniex_wrapper.go @@ -287,11 +287,6 @@ func (p *Poloniex) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) return p.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (p *Poloniex) GetWithdrawCapabilities() uint32 { - return p.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (p *Poloniex) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { resp, err := p.GetOpenOrdersForAllCurrencies() diff --git a/exchanges/request/request.go b/exchanges/request/request.go index 082f5c3d..8607f9f0 100644 --- a/exchanges/request/request.go +++ b/exchanges/request/request.go @@ -310,8 +310,8 @@ func (r *Requester) DoRequest(req *http.Request, path string, body io.Reader, re reader = resp.Body default: - log.Warnf("encoding is not JSON for request response but receieved %v", - resp.Header.Get("Content-Type")) + log.Warnf("%s request response content type differs from JSON; received %v [path: %s]", + r.Name, resp.Header.Get("Content-Type"), path) reader = resp.Body } } diff --git a/exchanges/yobit/yobit_wrapper.go b/exchanges/yobit/yobit_wrapper.go index 79100336..340ef671 100644 --- a/exchanges/yobit/yobit_wrapper.go +++ b/exchanges/yobit/yobit_wrapper.go @@ -271,11 +271,6 @@ func (y *Yobit) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return y.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (y *Yobit) GetWithdrawCapabilities() uint32 { - return y.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open func (y *Yobit) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { var orders []exchange.OrderDetail diff --git a/exchanges/zb/zb_wrapper.go b/exchanges/zb/zb_wrapper.go index 58996740..3e559771 100644 --- a/exchanges/zb/zb_wrapper.go +++ b/exchanges/zb/zb_wrapper.go @@ -292,11 +292,6 @@ func (z *ZB) GetFeeByType(feeBuilder exchange.FeeBuilder) (float64, error) { return z.GetFee(feeBuilder) } -// GetWithdrawCapabilities returns the types of withdrawal methods permitted by the exchange -func (z *ZB) GetWithdrawCapabilities() uint32 { - return z.GetWithdrawPermissions() -} - // GetActiveOrders retrieves any orders that are active/open // This function is not concurrency safe due to orderSide/orderType maps func (z *ZB) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { diff --git a/tools/exchange_template/exchange_template.go b/tools/exchange_template/exchange_template.go index ac5baa13..af3f75f7 100644 --- a/tools/exchange_template/exchange_template.go +++ b/tools/exchange_template/exchange_template.go @@ -219,7 +219,7 @@ func main() { fmt.Println("Update the config_test.go file") fmt.Println("Test config.go") fmt.Println("Open a pull request") - fmt.Println("If help is needed please post a message on the slack.") + fmt.Println("If help is needed please post a message on Slack.") } func newFile(path string) { diff --git a/tools/exchange_template/wrapper_file.tmpl b/tools/exchange_template/wrapper_file.tmpl index e1e58c87..98a8052e 100644 --- a/tools/exchange_template/wrapper_file.tmpl +++ b/tools/exchange_template/wrapper_file.tmpl @@ -2,10 +2,9 @@ package {{.Name}} import ( - "errors" "sync" -{{if .WS}} "github.com/thrasher-/gocryptotrader/common" {{end}} + "github.com/thrasher-/gocryptotrader/common" "github.com/thrasher-/gocryptotrader/currency/pair" "github.com/thrasher-/gocryptotrader/exchanges" "github.com/thrasher-/gocryptotrader/exchanges/orderbook" @@ -102,13 +101,13 @@ func ({{.Variable}} *{{.CapitalName}}) UpdateOrderbook(p pair.CurrencyPair, asse // GetAccountInfo retrieves balances for all enabled currencies for the // {{.CapitalName}} exchange func ({{.Variable}} *{{.CapitalName}}) GetAccountInfo() (exchange.AccountInfo, error) { - return exchange.AccountInfo{}, errors.New("not implemented") + return exchange.AccountInfo{}, common.ErrNotYetImplemented } // GetFundingHistory returns funding history, deposits and // withdrawals func ({{.Variable}} *{{.CapitalName}}) GetFundingHistory() ([]exchange.FundHistory, error) { - return nil, common.ErrFunctionNotSupported + return nil, common.ErrNotYetImplemented } // GetExchangeHistory returns historic trade data since exchange opening. @@ -170,4 +169,15 @@ func ({{.Variable}} *{{.CapitalName}}) GetWebsocket() (*exchange.Websocket, erro return nil, common.ErrNotYetImplemented } +// GetActiveOrders retrieves any orders that are active/open +func ({{.Variable}} *{{.CapitalName}}) GetActiveOrders(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { + return nil, common.ErrNotYetImplemented +} + +// GetOrderHistory retrieves account order information +// Can Limit response to specific order status +func ({{.Variable}} *{{.CapitalName}}) GetOrderHistory(getOrdersRequest exchange.GetOrdersRequest) ([]exchange.OrderDetail, error) { + return nil, common.ErrNotYetImplemented +} + {{end}}