mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pkg/exchange: use GTC if time-in-force empty
This commit is contained in:
parent
6d39c9a5d1
commit
93f8b79b69
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user