From 553fe3abf9fcae2b86dc3a7fe6f72cac7b1d4288 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 16 Mar 2022 13:51:31 +0800 Subject: [PATCH] remove config flag constrant --- pkg/cmd/orders.go | 3 --- pkg/types/profit.go | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/cmd/orders.go b/pkg/cmd/orders.go index ea0b34462..c75e8485d 100644 --- a/pkg/cmd/orders.go +++ b/pkg/cmd/orders.go @@ -77,7 +77,6 @@ var listOrdersCmd = &cobra.Command{ ValidArgs: []string{"", "open", "closed"}, SilenceUsage: true, PreRunE: cobraInitRequired([]string{ - "config", "session", "symbol", }), @@ -148,7 +147,6 @@ var executeOrderCmd = &cobra.Command{ Short: "execute buy/sell on the balance/position you have on specific symbol", SilenceUsage: true, PreRunE: cobraInitRequired([]string{ - "config", "symbol", "side", "target-quantity", @@ -299,7 +297,6 @@ var submitOrderCmd = &cobra.Command{ Short: "place order to the exchange", SilenceUsage: true, PreRunE: cobraInitRequired([]string{ - "config", "session", "symbol", "side", diff --git a/pkg/types/profit.go b/pkg/types/profit.go index 8b8ef783b..a86f92737 100644 --- a/pkg/types/profit.go +++ b/pkg/types/profit.go @@ -230,6 +230,7 @@ func (s *ProfitStats) Init(market Market) { func (s *ProfitStats) AddProfit(profit Profit) { s.AccumulatedPnL = s.AccumulatedPnL.Add(profit.Profit) s.AccumulatedNetProfit = s.AccumulatedNetProfit.Add(profit.NetProfit) + s.TodayPnL = s.TodayPnL.Add(profit.Profit) s.TodayNetProfit = s.TodayNetProfit.Add(profit.NetProfit)