minor improvements and bugfixes

1) reduce request content-type mismatch ambiguity
2) remove duplicate wrapper function for withdraw permissions
3) update exchange_template tool to add missing/incorrect wrapper funcs
This commit is contained in:
Adrian Gallagher
2019-02-27 14:43:23 +11:00
parent 3066f3d027
commit e000a8d6c7
32 changed files with 23 additions and 153 deletions

View File

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

View File

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