add kucoin to the exchange factory

This commit is contained in:
c9s 2021-12-22 00:30:50 +08:00
parent 58212290ad
commit bd5e956892
2 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/c9s/bbgo/pkg/exchange/binance"
"github.com/c9s/bbgo/pkg/exchange/ftx"
"github.com/c9s/bbgo/pkg/exchange/kucoin"
"github.com/c9s/bbgo/pkg/exchange/max"
"github.com/c9s/bbgo/pkg/exchange/okex"
"github.com/c9s/bbgo/pkg/types"
@ -27,6 +28,9 @@ func NewExchangeStandard(n types.ExchangeName, key, secret, passphrase, subAccou
case types.ExchangeOKEx:
return okex.New(key, secret, passphrase), nil
case types.ExchangeKucoin:
return kucoin.New(key, secret, passphrase), nil
default:
return nil, fmt.Errorf("unsupported exchange: %v", n)

View File

@ -44,6 +44,7 @@ const (
ExchangeBinance = ExchangeName("binance")
ExchangeFTX = ExchangeName("ftx")
ExchangeOKEx = ExchangeName("okex")
ExchangeKucoin = ExchangeName("kucoin")
ExchangeBacktest = ExchangeName("backtest")
)