mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
pull out BNB currency string
This commit is contained in:
parent
ea78c0308b
commit
016c60796d
|
@ -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) {
|
||||
|
|
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue
Block a user