max: fix order delete refurl

This commit is contained in:
c9s 2021-06-27 11:32:14 +08:00
parent 3fdcf466bf
commit a8048703b3

View File

@ -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)
@ -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")
@ -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
}