add kline color and submitMarketOrder method

This commit is contained in:
c9s 2020-06-16 15:14:23 +08:00
parent 884a9730f1
commit d28bec2a05

View File

@ -128,8 +128,16 @@ func (k KLine) String() string {
func (k KLine) SlackAttachment() slack.Attachment {
var color = ""
if k.GetTrend() > 0 {
color = "green"
} else if k.GetTrend() < 0 {
color = "red"
}
return slack.Attachment{
Text: "KLine",
Color: color,
Fields: []slack.AttachmentField{
{
Title: "Open",