FEATURE: [dca2] set exchange fee rate for round position

This commit is contained in:
kbearXD 2024-09-11 15:40:45 +08:00 committed by lychiyu
parent 9bb593e5c3
commit 2c1e84ee5a

View File

@ -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())