mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
23 lines
328 B
Go
23 lines
328 B
Go
|
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
|
||
|
}
|