mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
Merge pull request #1083 from c9s/fix/maxapi/group-id
FIX: add group id on submit order API
This commit is contained in:
commit
4e6614e711
|
@ -482,6 +482,11 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr
|
|||
OrderType(orderType).
|
||||
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:
|
||||
var priceInString string
|
||||
|
|
|
@ -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