mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 01:05:15 +00:00
types: fix submit order preview
This commit is contained in:
parent
140e5638b8
commit
77c2a6e10b
|
@ -126,15 +126,15 @@ type SubmitOrder struct {
|
||||||
ClosePosition bool `json:"closePosition" db:"close_position"`
|
ClosePosition bool `json:"closePosition" db:"close_position"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *SubmitOrder) String() string {
|
func (o SubmitOrder) String() string {
|
||||||
return fmt.Sprintf("SubmitOrder %s %s %s %f @ %f", o.Symbol, o.Type, o.Side, o.Quantity, o.Price)
|
return fmt.Sprintf("SubmitOrder %s %s %s %f @ %f", o.Symbol, o.Type, o.Side, o.Quantity, o.Price)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *SubmitOrder) PlainText() string {
|
func (o SubmitOrder) PlainText() string {
|
||||||
return fmt.Sprintf("SubmitOrder %s %s %s %f @ %f", o.Symbol, o.Type, o.Side, o.Quantity, o.Price)
|
return fmt.Sprintf("SubmitOrder %s %s %s %f @ %f", o.Symbol, o.Type, o.Side, o.Quantity, o.Price)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *SubmitOrder) SlackAttachment() slack.Attachment {
|
func (o SubmitOrder) SlackAttachment() slack.Attachment {
|
||||||
var fields = []slack.AttachmentField{
|
var fields = []slack.AttachmentField{
|
||||||
{Title: "Symbol", Value: o.Symbol, Short: true},
|
{Title: "Symbol", Value: o.Symbol, Short: true},
|
||||||
{Title: "Side", Value: string(o.Side), Short: true},
|
{Title: "Side", Value: string(o.Side), Short: true},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user