mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
make sure group id is > 0
This commit is contained in:
parent
d466a63d22
commit
83d9977a57
|
@ -480,9 +480,12 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr
|
|||
Side(toLocalSideType(o.Side)).
|
||||
Volume(quantityString).
|
||||
OrderType(orderType).
|
||||
ClientOrderID(clientOrderID).
|
||||
// TODO: make sure MAX API support uint32 group id
|
||||
GroupID(fmt.Sprintf("%d", o.GroupID))
|
||||
ClientOrderID(clientOrderID)
|
||||
|
||||
if o.GroupID > 0 {
|
||||
// TODO: MAX API only support 0 ~ 2^31-1 (2147483647)
|
||||
req.GroupID(strconv.FormatUint(uint64(o.GroupID), 10))
|
||||
}
|
||||
|
||||
switch o.Type {
|
||||
case types.OrderTypeStopLimit, types.OrderTypeLimit, types.OrderTypeLimitMaker:
|
||||
|
|
Loading…
Reference in New Issue
Block a user