mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
rename Trade.Market to Symbol
This commit is contained in:
parent
5cf88af5d6
commit
ea33db5aa1
|
@ -90,7 +90,7 @@ func (e *BinanceExecutionReportEvent) Trade() (*Trade, error) {
|
|||
tt := time.Unix(0, e.TransactionTime/1000000)
|
||||
return &Trade{
|
||||
ID: e.TradeID,
|
||||
Market: e.Symbol,
|
||||
Symbol: e.Symbol,
|
||||
Price: MustParseFloat(e.LastExecutedPrice),
|
||||
Volume: MustParseFloat(e.LastExecutedQuantity),
|
||||
IsBuyer: e.Side == "BUY",
|
||||
|
|
|
@ -11,7 +11,7 @@ type Trade struct {
|
|||
IsBuyer bool
|
||||
IsMaker bool
|
||||
Time time.Time
|
||||
Market string
|
||||
Symbol string
|
||||
Fee float64
|
||||
FeeCurrency string
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ func (t *Trader) ReportTrade(e *BinanceExecutionReportEvent, trade *Trade) {
|
|||
// Pretext: "",
|
||||
// Text: "",
|
||||
Fields: []slack.AttachmentField{
|
||||
{Title: "Market", Value: trade.Market, Short: true,},
|
||||
{Title: "Symbol", Value: trade.Symbol, Short: true,},
|
||||
{Title: "Side", Value: e.Side, Short: true,},
|
||||
{Title: "Price", Value: USD.FormatMoney(trade.Price), Short: true,},
|
||||
{Title: "Volume", Value: t.Context.Market.FormatVolume(trade.Volume), Short: true,},
|
||||
|
@ -130,7 +130,7 @@ func (t *Trader) ReportPnL() {
|
|||
// Text: "",
|
||||
Fields: []slack.AttachmentField{
|
||||
{
|
||||
Title: "Market",
|
||||
Title: "Symbol",
|
||||
Value: tradingCtx.Symbol,
|
||||
Short: true,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user