mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
exchanges/order, GateIO: Update USDT margined futures pathway for cancel all orders (#2021)
* order/gateio: update USDT margined futures pathway for cancel all orders and drop count field * gateio: add and expand tests for CancelAllOrders and getExchangeSide * Add test for load * linter: fix * Update exchanges/kraken/kraken_wrapper.go Co-authored-by: Scott <gloriousCode@users.noreply.github.com> * glorious: nits * Update exchanges/order/orders.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * gk: nits * glorious: nits * reverted change for options * Update exchanges/gateio/gateio_wrapper_test.go Co-authored-by: Scott <gloriousCode@users.noreply.github.com> * Update exchanges/gateio/gateio_wrapper.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * Update exchanges/deribit/deribit_wrapper.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * Update exchanges/gateio/gateio_wrapper_test.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * Update exchanges/gateio/gateio_wrapper_test.go Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> * Add consts for cancel side references * Update exchanges/gateio/gateio_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * Update exchanges/gateio/gateio_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * Update exchanges/gateio/gateio_websocket_request_futures.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * thrasher-: nits --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io> Co-authored-by: Scott <gloriousCode@users.noreply.github.com> Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com> Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -1438,12 +1438,14 @@ func (s *RPCServer) CancelAllOrders(ctx context.Context, r *gctrpc.CancelAllOrde
|
||||
// TODO: Change to order manager
|
||||
resp, err := exch.CancelAllOrders(ctx, nil)
|
||||
if err != nil {
|
||||
return &gctrpc.CancelAllOrdersResponse{}, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &gctrpc.CancelAllOrdersResponse{
|
||||
Count: resp.Count, // count of deleted orders
|
||||
}, nil
|
||||
cancelledOrders := new(gctrpc.Orders)
|
||||
cancelledOrders.Exchange = r.Exchange
|
||||
cancelledOrders.OrderStatus = resp.Status
|
||||
|
||||
return &gctrpc.CancelAllOrdersResponse{Orders: []*gctrpc.Orders{cancelledOrders}, Count: int64(len(resp.Status))}, nil
|
||||
}
|
||||
|
||||
// ModifyOrder modifies an existing order if it exists
|
||||
|
||||
Reference in New Issue
Block a user