mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
update timeInForce for binance margin order
This commit is contained in:
parent
f12ba1adb9
commit
ba913ce4de
|
@ -1005,16 +1005,13 @@ func (e *Exchange) submitMarginOrder(ctx context.Context, order types.SubmitOrde
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// could be IOC or FOK
|
if len(order.TimeInForce) > 0 {
|
||||||
switch order.Type {
|
// TODO: check the TimeInForce value
|
||||||
case types.OrderTypeLimit, types.OrderTypeStopLimit:
|
req.TimeInForce(binance.TimeInForceType(order.TimeInForce))
|
||||||
req.TimeInForce(binance.TimeInForceTypeGTC)
|
} else {
|
||||||
case types.OrderTypeLimitMaker:
|
switch order.Type {
|
||||||
// do not set TimeInForce for LimitMaker
|
case types.OrderTypeLimit, types.OrderTypeStopLimit:
|
||||||
default:
|
req.TimeInForce(binance.TimeInForceTypeGTC)
|
||||||
if len(order.TimeInForce) > 0 {
|
|
||||||
// TODO: check the TimeInForce value
|
|
||||||
req.TimeInForce(binance.TimeInForceType(order.TimeInForce))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user