mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +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)).
|
Side(toLocalSideType(o.Side)).
|
||||||
Volume(quantityString).
|
Volume(quantityString).
|
||||||
OrderType(orderType).
|
OrderType(orderType).
|
||||||
ClientOrderID(clientOrderID).
|
ClientOrderID(clientOrderID)
|
||||||
// TODO: make sure MAX API support uint32 group id
|
|
||||||
GroupID(fmt.Sprintf("%d", o.GroupID))
|
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 {
|
switch o.Type {
|
||||||
case types.OrderTypeStopLimit, types.OrderTypeLimit, types.OrderTypeLimitMaker:
|
case types.OrderTypeStopLimit, types.OrderTypeLimit, types.OrderTypeLimitMaker:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user