FIX: add group id on submit order API

This commit is contained in:
chiahung 2023-03-06 15:58:18 +08:00
parent 1dd6f9ef3e
commit d466a63d22
3 changed files with 6 additions and 4 deletions

View File

@ -480,7 +480,9 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr
Side(toLocalSideType(o.Side)).
Volume(quantityString).
OrderType(orderType).
ClientOrderID(clientOrderID)
ClientOrderID(clientOrderID).
// TODO: make sure MAX API support uint32 group id
GroupID(fmt.Sprintf("%d", o.GroupID))
switch o.Type {
case types.OrderTypeStopLimit, types.OrderTypeLimit, types.OrderTypeLimitMaker:

View File

@ -22,5 +22,5 @@ type CancelWalletOrderAllRequest struct {
walletType WalletType `param:"walletType,slug,required"`
side *string `param:"side"`
market *string `param:"market"`
groupID *uint32 `param:"groupID"`
groupID *uint32 `param:"group_id"`
}

View File

@ -64,12 +64,12 @@ func (c *CancelWalletOrderAllRequest) GetParameters() (map[string]interface{}, e
params["market"] = market
} else {
}
// check groupID field -> json key groupID
// check groupID field -> json key group_id
if c.groupID != nil {
groupID := *c.groupID
// assign parameter of groupID
params["groupID"] = groupID
params["group_id"] = groupID
} else {
}