mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
remove err since handling init for client
This commit is contained in:
parent
dbf29f8cd2
commit
9a66f82d8c
|
@ -37,7 +37,7 @@ func New(n types.ExchangeName, key, secret, passphrase string) (types.ExchangeMi
|
|||
return max.New(key, secret), nil
|
||||
|
||||
case types.ExchangeOKEx:
|
||||
return okex.New(key, secret, passphrase)
|
||||
return okex.New(key, secret, passphrase), nil
|
||||
|
||||
case types.ExchangeKucoin:
|
||||
return kucoin.New(key, secret, passphrase), nil
|
||||
|
|
|
@ -34,7 +34,7 @@ type Exchange struct {
|
|||
client *okexapi.RestClient
|
||||
}
|
||||
|
||||
func New(key, secret, passphrase string) (*Exchange, error) {
|
||||
func New(key, secret, passphrase string) *Exchange {
|
||||
client := okexapi.NewClient()
|
||||
|
||||
if len(key) > 0 && len(secret) > 0 {
|
||||
|
@ -46,7 +46,7 @@ func New(key, secret, passphrase string) (*Exchange, error) {
|
|||
secret: secret,
|
||||
passphrase: passphrase,
|
||||
client: client,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Exchange) Name() types.ExchangeName {
|
||||
|
|
|
@ -22,8 +22,7 @@ func Test_QueryOrder(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
e, err := New(key, secret, passphrase)
|
||||
assert.NoError(t, err)
|
||||
e := New(key, secret, passphrase)
|
||||
|
||||
queryOrder := types.OrderQuery{
|
||||
Symbol: "BTC-USDT",
|
||||
|
|
Loading…
Reference in New Issue
Block a user