fix_ok_sell_bug (#1173)

This commit is contained in:
Derek
2023-04-27 08:16:12 +08:00
committed by GitHub
parent 969669cb0d
commit 492ea20f21

View File

@@ -409,7 +409,7 @@ func (ok *Okx) validatePlaceOrderParams(arg *PlaceOrderRequestParam) error {
return errMissingInstrumentID
}
arg.Side = strings.ToLower(arg.Side)
if arg.Side != order.Buy.Lower() && arg.Side != order.Sell.String() {
if arg.Side != order.Buy.Lower() && arg.Side != order.Sell.Lower() {
return fmt.Errorf("%w %s", errInvalidOrderSide, arg.Side)
}
if arg.TradeMode != TradeModeCross &&