diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index 0ad8204..0866234 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -1020,16 +1020,13 @@ func (e *Exchange) submitMarginOrder(ctx context.Context, order types.SubmitOrde } } - // could be IOC or FOK - switch order.Type { - case types.OrderTypeLimit, types.OrderTypeStopLimit: - req.TimeInForce(binance.TimeInForceTypeGTC) - case types.OrderTypeLimitMaker: - // do not set TimeInForce for LimitMaker - default: - if len(order.TimeInForce) > 0 { - // TODO: check the TimeInForce value - req.TimeInForce(binance.TimeInForceType(order.TimeInForce)) + if len(order.TimeInForce) > 0 { + // TODO: check the TimeInForce value + req.TimeInForce(binance.TimeInForceType(order.TimeInForce)) + } else { + switch order.Type { + case types.OrderTypeLimit, types.OrderTypeStopLimit: + req.TimeInForce(binance.TimeInForceTypeGTC) } }