mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
max: fix order delete refurl
This commit is contained in:
parent
3fdcf466bf
commit
a8048703b3
|
@ -13,7 +13,7 @@ var relUrlV2Order *url.URL
|
||||||
var relUrlV2Orders *url.URL
|
var relUrlV2Orders *url.URL
|
||||||
var relUrlV2OrdersClear *url.URL
|
var relUrlV2OrdersClear *url.URL
|
||||||
var relUrlV2OrdersDelete *url.URL
|
var relUrlV2OrdersDelete *url.URL
|
||||||
var relUrlV2OrdersMultiOneByOne *url.URL
|
var relUrlV2OrdersMultiOneByOne, relUrlV2OrderDelete *url.URL
|
||||||
|
|
||||||
func mustParseURL(s string) *url.URL {
|
func mustParseURL(s string) *url.URL {
|
||||||
u, err := url.Parse(s)
|
u, err := url.Parse(s)
|
||||||
|
@ -25,6 +25,7 @@ func mustParseURL(s string) *url.URL {
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
relUrlV2Order = mustParseURL("v2/order")
|
relUrlV2Order = mustParseURL("v2/order")
|
||||||
|
relUrlV2OrderDelete = mustParseURL("v2/order/delete")
|
||||||
relUrlV2Orders = mustParseURL("v2/orders")
|
relUrlV2Orders = mustParseURL("v2/orders")
|
||||||
relUrlV2OrdersClear = mustParseURL("v2/orders/clear")
|
relUrlV2OrdersClear = mustParseURL("v2/orders/clear")
|
||||||
relUrlV2OrdersDelete = mustParseURL("v2/orders/delete")
|
relUrlV2OrdersDelete = mustParseURL("v2/orders/delete")
|
||||||
|
@ -344,7 +345,7 @@ func (r *OrderCancelRequest) ClientOrderID(id string) *OrderCancelRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *OrderCancelRequest) Do(ctx context.Context) error {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user