From 93f8b79b69b2aecdc1f420b8a285ab46193afff6 Mon Sep 17 00:00:00 2001 From: Edwin Date: Thu, 16 Nov 2023 13:33:17 +0800 Subject: [PATCH] pkg/exchange: use GTC if time-in-force empty --- pkg/exchange/bitget/exchange.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/exchange/bitget/exchange.go b/pkg/exchange/bitget/exchange.go index e8736cd65..be0030428 100644 --- a/pkg/exchange/bitget/exchange.go +++ b/pkg/exchange/bitget/exchange.go @@ -289,7 +289,7 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr // 2. The query oepn/closed order does not including the `force` in SPOT. // If we support FOK/IOC, but you can't query them, that would be unreasonable. // The other case to consider is 'PostOnly', which is a trade-off because we want to support 'xmaker'. - if order.TimeInForce != types.TimeInForceGTC { + if order.TimeInForce != types.TimeInForceGTC && len(order.TimeInForce) != 0 { return nil, fmt.Errorf("time-in-force %s not supported", order.TimeInForce) } req.Force(v2.OrderForceGTC)