add fee rate field

This commit is contained in:
c9s 2021-05-16 15:03:36 +08:00
parent 5c10f8a4e2
commit a4381a54a3
2 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@ import (
"strings"
"time"
"github.com/c9s/bbgo/pkg/fixedpoint"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
@ -116,7 +117,8 @@ type ExchangeSession struct {
SubAccount string `json:"subAccount,omitempty" yaml:"subAccount,omitempty"`
// Withdrawal is used for enabling withdrawal functions
Withdrawal bool `json:"withdrawal,omitempty" yaml:"withdrawal,omitempty"`
Withdrawal bool `json:"withdrawal,omitempty" yaml:"withdrawal,omitempty"`
FeeRate fixedpoint.Value `json:"feeRate" yaml:"feeRate"`
PublicOnly bool `json:"publicOnly,omitempty" yaml:"publicOnly"`
Margin bool `json:"margin,omitempty" yaml:"margin"`
@ -164,7 +166,6 @@ type ExchangeSession struct {
orderStores map[string]*OrderStore
usedSymbols map[string]struct{}
initializedSymbols map[string]struct{}

View File

@ -70,7 +70,7 @@ var accountCmd = &cobra.Command{
a, err := session.Exchange.QueryAccount(ctx)
if err != nil {
return err
return errors.Wrapf(err, "account query failed")
}
a.Print()
@ -78,7 +78,7 @@ var accountCmd = &cobra.Command{
for _, session := range environ.Sessions() {
a, err := session.Exchange.QueryAccount(ctx)
if err != nil {
return err
return errors.Wrapf(err, "account query failed")
}
log.Infof("SESSION %s", session.Name)