ftx: add missing ftx case

This commit is contained in:
ycdesu 2021-03-27 17:00:07 +08:00
parent 691251169d
commit 34548f185c

View File

@ -7,8 +7,6 @@ import (
"fmt" "fmt"
"strings" "strings"
"time" "time"
"github.com/pkg/errors"
) )
const DateFormat = "2006-01-02" const DateFormat = "2006-01-02"
@ -51,9 +49,11 @@ func ValidExchangeName(a string) (ExchangeName, error) {
return ExchangeMax, nil return ExchangeMax, nil
case "binance", "bn": case "binance", "bn":
return ExchangeBinance, nil return ExchangeBinance, nil
case "ftx":
return ExchangeFTX, nil
} }
return "", errors.New("invalid exchange name") return "", fmt.Errorf("invalid exchange name: %s", a)
} }
type Exchange interface { type Exchange interface {