mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix(max): IsBuyer should check side "buy" and "bid"
This commit is contained in:
parent
7e1825d991
commit
30f085fa91
|
@ -37,7 +37,7 @@ type Trade struct {
|
|||
}
|
||||
|
||||
func (t Trade) IsBuyer() bool {
|
||||
return t.Side == "bid"
|
||||
return t.Side == "bid" || t.Side == "buy"
|
||||
}
|
||||
|
||||
func (t Trade) IsMaker() bool {
|
||||
|
|
|
@ -194,7 +194,7 @@ func convertWebSocketTrade(t max.TradeUpdate) (*types.Trade, error) {
|
|||
Price: price,
|
||||
Quantity: quantity,
|
||||
Side: side,
|
||||
IsBuyer: side == "bid",
|
||||
IsBuyer: side == "bid" || side == "buy",
|
||||
IsMaker: t.Maker,
|
||||
Fee: fee,
|
||||
FeeCurrency: toGlobalCurrency(t.FeeCurrency),
|
||||
|
|
Loading…
Reference in New Issue
Block a user