pull out BNB currency string

This commit is contained in:
c9s 2021-05-26 02:15:47 +08:00
parent ea78c0308b
commit 016c60796d
2 changed files with 4 additions and 3 deletions

View File

@ -19,6 +19,8 @@ import (
"github.com/c9s/bbgo/pkg/util"
)
const BNB = "BNB"
var log = logrus.WithFields(logrus.Fields{
"exchange": "binance",
})
@ -394,9 +396,8 @@ func (e *Exchange) QueryAccountBalances(ctx context.Context) (types.BalanceMap,
return account.Balances(), nil
}
// PlatformFeeCurrency
func (e *Exchange) PlatformFeeCurrency() string {
return "BNB"
return BNB
}
func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error) {

View File

@ -107,7 +107,7 @@ func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error) {
market := types.Market{
Symbol: symbol,
LocalSymbol: m.Name,
// The max precision is length(DefaultPow). For example, currently fixedpoint.DefaultPow
// is 1e8, so the max precision will be 8.
PricePrecision: fixedpoint.NumFractionalDigits(fixedpoint.NewFromFloat(m.PriceIncrement)),