bbgo_origin/pkg/exchange/binance/trade.go

23 lines
328 B
Go
Raw Normal View History

2020-07-11 05:02:53 +00:00
package binance
import "github.com/adshao/go-binance"
func BuyerOrSellerLabel(trade *binance.TradeV3) (o string) {
if trade.IsBuyer {
o = "BUYER"
} else {
o = "SELLER"
}
return o
}
func MakerOrTakerLabel(trade *binance.TradeV3) (o string) {
if trade.IsMaker {
o += "MAKER"
} else {
o += "TAKER"
}
return o
}