There was an error while loading. Please reload this page.
2 parents 3b6a9d7 + aa1a1e1 commit 633bceaCopy full SHA for 633bcea
1 file changed
pkg/strategy/xfundingv2/round.go
@@ -444,6 +444,19 @@ func (n *roundNotification) SlackAttachment() slack.Attachment {
444
fields = append(fields, unrealizedPnLFields(unrealizedPnL)...)
445
}
446
447
+ if len(n.ArbitrageRound.syncState.FundingFeeRecords) > 0 {
448
+ feeIncomeTotal := fixedpoint.Zero
449
+ numRecords := fixedpoint.Zero
450
+ for _, fee := range n.ArbitrageRound.syncState.FundingFeeRecords {
451
+ feeIncomeTotal = feeIncomeTotal.Add(fee.Amount)
452
+ numRecords = numRecords.Add(fixedpoint.One)
453
+ }
454
+ fields = append(fields, slack.AttachmentField{
455
+ Title: "Average Funding Income",
456
+ Value: feeIncomeTotal.Div(numRecords).String(),
457
+ Short: true,
458
+ })
459
460
461
fields = append(fields, []slack.AttachmentField{
462
{
0 commit comments