fix side issue

This commit is contained in:
c9s 2020-07-11 21:44:38 +08:00
parent 577caab3f5
commit c0d0aca3b8

View File

@ -94,6 +94,7 @@ func (e *ExecutionReportEvent) Trade() (*types.Trade, error) {
Symbol: e.Symbol, Symbol: e.Symbol,
Price: util.MustParseFloat(e.LastExecutedPrice), Price: util.MustParseFloat(e.LastExecutedPrice),
Volume: util.MustParseFloat(e.LastExecutedQuantity), Volume: util.MustParseFloat(e.LastExecutedQuantity),
Side: e.Side,
IsBuyer: e.Side == "BUY", IsBuyer: e.Side == "BUY",
IsMaker: e.IsMaker, IsMaker: e.IsMaker,
Time: tt, Time: tt,
@ -280,4 +281,3 @@ type EventBase struct {
Event string `json:"e"` // event Event string `json:"e"` // event
Time int64 `json:"E"` Time int64 `json:"E"`
} }