Skip to content

Commit

Permalink
Merge pull request #1739 from c9s/kbearXD/dca2/set-exchange-fee-rate
Browse files Browse the repository at this point in the history
FEATURE: [dca2] set exchange fee rate for round position
  • Loading branch information
kbearXD authored Sep 11, 2024
2 parents 82d07a0 + f83491a commit a9b71ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/strategy/dca2/take_profit.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ func (s *Strategy) placeTakeProfitOrders(ctx context.Context) error {
}

roundPosition := types.NewPositionFromMarket(s.Market)
roundPosition.SetExchangeFeeRate(s.ExchangeSession.ExchangeName, types.ExchangeFee{
MakerFeeRate: s.ExchangeSession.MakerFeeRate,
TakerFeeRate: s.ExchangeSession.TakerFeeRate,
})

for _, trade := range trades {
s.logger.Infof("add trade into the position of this round %s", trade.String())
Expand Down

0 comments on commit a9b71ad

Please sign in to comment.