From 1102fd0a1ec3bd839da89585650fa22e1dff1f0b Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 16 Jun 2020 16:55:42 +0800 Subject: [PATCH] rename Symbol field to Market --- bbgo/parser.go | 2 +- bbgo/trade.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bbgo/parser.go b/bbgo/parser.go index e6fc8ded7..6f1fda405 100644 --- a/bbgo/parser.go +++ b/bbgo/parser.go @@ -90,7 +90,7 @@ func (e *ExecutionReportEvent) Trade() (*Trade, error) { tt := time.Unix(0, e.TransactionTime/1000000) return &Trade{ ID: e.TradeID, - Symbol: e.Symbol, + Market: e.Symbol, Price: MustParseFloat(e.LastExecutedPrice), Volume: MustParseFloat(e.LastExecutedQuantity), IsBuyer: e.Side == "BUY", diff --git a/bbgo/trade.go b/bbgo/trade.go index 10027d79c..599288a6d 100644 --- a/bbgo/trade.go +++ b/bbgo/trade.go @@ -9,13 +9,13 @@ import ( ) type Trade struct { - ID int64 - Price float64 - Volume float64 - IsBuyer bool - IsMaker bool - Time time.Time - Symbol string + ID int64 + Price float64 + Volume float64 + IsBuyer bool + IsMaker bool + Time time.Time + Market string Fee float64 FeeCurrency string }