fix(ftx/rest): use Id() to make rest requests

This commit is contained in:
Jui-Nan Lin 2021-05-24 11:20:39 +08:00
parent 7fd3375741
commit 9226d086b3

View File

@ -68,7 +68,7 @@ func (r *orderRequest) CancelOrderByOrderID(ctx context.Context, orderID uint64)
resp, err := r. resp, err := r.
Method("DELETE"). Method("DELETE").
ReferenceURL("api/orders"). ReferenceURL("api/orders").
Payloads(map[string]interface{}{"order_id": orderID}). Id(strconv.FormatUint(orderID, 10)).
DoAuthenticatedRequest(ctx) DoAuthenticatedRequest(ctx)
if err != nil { if err != nil {
return cancelOrderResponse{}, err return cancelOrderResponse{}, err
@ -85,7 +85,7 @@ func (r *orderRequest) CancelOrderByClientID(ctx context.Context, clientID strin
resp, err := r. resp, err := r.
Method("DELETE"). Method("DELETE").
ReferenceURL("api/orders/by_client_id"). ReferenceURL("api/orders/by_client_id").
Payloads(map[string]interface{}{"client_order_id": clientID}). Id(clientID).
DoAuthenticatedRequest(ctx) DoAuthenticatedRequest(ctx)
if err != nil { if err != nil {
return cancelOrderResponse{}, err return cancelOrderResponse{}, err