mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
FIX: add group id on submit order API
This commit is contained in:
parent
1dd6f9ef3e
commit
d466a63d22
|
@ -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:
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user