Skip to content

Commit

Permalink
max: fix order delete refurl
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jun 27, 2021
1 parent dbc1172 commit 7dbd4fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/exchange/max/maxapi/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var relUrlV2Order *url.URL
var relUrlV2Orders *url.URL
var relUrlV2OrdersClear *url.URL
var relUrlV2OrdersDelete *url.URL
var relUrlV2OrdersMultiOneByOne *url.URL
var relUrlV2OrdersMultiOneByOne, relUrlV2OrderDelete *url.URL

func mustParseURL(s string) *url.URL {
u, err := url.Parse(s)
Expand All @@ -25,6 +25,7 @@ func mustParseURL(s string) *url.URL {

func init() {
relUrlV2Order = mustParseURL("v2/order")
relUrlV2OrderDelete = mustParseURL("v2/order/delete")
relUrlV2Orders = mustParseURL("v2/orders")
relUrlV2OrdersClear = mustParseURL("v2/orders/clear")
relUrlV2OrdersDelete = mustParseURL("v2/orders/delete")
Expand Down Expand Up @@ -344,7 +345,7 @@ func (r *OrderCancelRequest) ClientOrderID(id string) *OrderCancelRequest {
}

func (r *OrderCancelRequest) Do(ctx context.Context) error {
req, err := r.client.newAuthenticatedRequest("POST", "v2/order/delete", &r.params, relUrlV2OrdersDelete)
req, err := r.client.newAuthenticatedRequest("POST", "v2/order/delete", &r.params, relUrlV2OrderDelete)
if err != nil {
return err
}
Expand Down

0 comments on commit 7dbd4fa

Please sign in to comment.