mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 17:13:51 +00:00
render trade time
This commit is contained in:
parent
45e930a086
commit
61d95a4c34
|
@ -4,6 +4,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/slack-go/slack"
|
"github.com/slack-go/slack"
|
||||||
|
|
||||||
|
@ -102,10 +103,10 @@ func (trade Trade) SlackAttachment() slack.Attachment {
|
||||||
}
|
}
|
||||||
|
|
||||||
liquidity := trade.Liquidity()
|
liquidity := trade.Liquidity()
|
||||||
title := util.Render(slackTradeTextTemplate, trade)
|
text := util.Render(slackTradeTextTemplate, trade)
|
||||||
return slack.Attachment{
|
return slack.Attachment{
|
||||||
Title: title,
|
Text: text,
|
||||||
// Text: text,
|
// Title: ...
|
||||||
// Pretext: pretext,
|
// Pretext: pretext,
|
||||||
Color: color,
|
Color: color,
|
||||||
Fields: []slack.AttachmentField{
|
Fields: []slack.AttachmentField{
|
||||||
|
@ -117,8 +118,7 @@ func (trade Trade) SlackAttachment() slack.Attachment {
|
||||||
{Title: "FeeCurrency", Value: trade.FeeCurrency, Short: true},
|
{Title: "FeeCurrency", Value: trade.FeeCurrency, Short: true},
|
||||||
{Title: "Liquidity", Value: liquidity, Short: true},
|
{Title: "Liquidity", Value: liquidity, Short: true},
|
||||||
},
|
},
|
||||||
// Footer: tradingCtx.TradeStartTime.Format(time.RFC822),
|
Footer: util.Render("trade time {{ . }}", trade.Time.Time().Format(time.RFC822)),
|
||||||
// FooterIcon: "",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user