You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
414 B

package types
type Side int32
const (
SideLong Side = 1 // LONG
SideShort Side = 2 // SHORT
)
func (side Side) IsValid() bool {
return side == SideLong || side == SideShort
}
func (side Side) String() string {
switch side {
default:
return ""
case SideLong:
return "LONG"
case SideShort:
return "SHORT"
}
}
// SideInst 交易方向和对象
type SideInst struct {
InstId string
Side Side
}