mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 07:26:48 +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:
@@ -66,29 +66,6 @@ func TestUpdateTradablePairs(t *testing.T) {
|
||||
testexch.UpdatePairsOnce(t, e)
|
||||
}
|
||||
|
||||
func TestCancelAllExchangeOrders(t *testing.T) {
|
||||
t.Parallel()
|
||||
sharedtestvalues.SkipTestIfCredentialsUnset(t, e, canManipulateRealOrders)
|
||||
_, err := e.CancelAllOrders(t.Context(), nil)
|
||||
require.ErrorIs(t, err, order.ErrCancelOrderIsNil)
|
||||
|
||||
r := &order.Cancel{
|
||||
OrderID: "1",
|
||||
AccountID: "1",
|
||||
}
|
||||
|
||||
for _, a := range e.GetAssetTypes(false) {
|
||||
r.AssetType = a
|
||||
r.Pair = currency.EMPTYPAIR
|
||||
_, err = e.CancelAllOrders(t.Context(), r)
|
||||
assert.ErrorIs(t, err, currency.ErrCurrencyPairEmpty)
|
||||
|
||||
r.Pair = getPair(t, a)
|
||||
_, err = e.CancelAllOrders(t.Context(), r)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetAccountInfo(t *testing.T) {
|
||||
t.Parallel()
|
||||
sharedtestvalues.SkipTestIfCredentialsUnset(t, e)
|
||||
|
||||
Reference in New Issue
Block a user