mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53: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
|
return max.New(key, secret), nil
|
||||||
|
|
||||||
case types.ExchangeOKEx:
|
case types.ExchangeOKEx:
|
||||||
return okex.New(key, secret, passphrase)
|
return okex.New(key, secret, passphrase), nil
|
||||||
|
|
||||||
case types.ExchangeKucoin:
|
case types.ExchangeKucoin:
|
||||||
return kucoin.New(key, secret, passphrase), nil
|
return kucoin.New(key, secret, passphrase), nil
|
||||||
|
|
|
@ -34,7 +34,7 @@ type Exchange struct {
|
||||||
client *okexapi.RestClient
|
client *okexapi.RestClient
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(key, secret, passphrase string) (*Exchange, error) {
|
func New(key, secret, passphrase string) *Exchange {
|
||||||
client := okexapi.NewClient()
|
client := okexapi.NewClient()
|
||||||
|
|
||||||
if len(key) > 0 && len(secret) > 0 {
|
if len(key) > 0 && len(secret) > 0 {
|
||||||
|
@ -46,7 +46,7 @@ func New(key, secret, passphrase string) (*Exchange, error) {
|
||||||
secret: secret,
|
secret: secret,
|
||||||
passphrase: passphrase,
|
passphrase: passphrase,
|
||||||
client: client,
|
client: client,
|
||||||
}, nil
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Exchange) Name() types.ExchangeName {
|
func (e *Exchange) Name() types.ExchangeName {
|
||||||
|
|
|
@ -22,8 +22,7 @@ func Test_QueryOrder(t *testing.T) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
e, err := New(key, secret, passphrase)
|
e := New(key, secret, passphrase)
|
||||||
assert.NoError(t, err)
|
|
||||||
|
|
||||||
queryOrder := types.OrderQuery{
|
queryOrder := types.OrderQuery{
|
||||||
Symbol: "BTC-USDT",
|
Symbol: "BTC-USDT",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user