Files
gocryptotrader/exchanges/kucoin/kucoin_wrapper_test.go
Ryan O'Hara-Reid 7f412e2772 Kucoin: Update order execution limits (#2124)
* refactor(kucoin): enhance contract and symbol structures, update order execution limits tests

* fix(number): handle null input in UnmarshalJSON and update tests

* Update exchanges/kucoin/kucoin_futures_types.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_futures_types.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_types.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/kucoin/kucoin_wrapper.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* glorious: destroyed this code across all implementations

* glorious: rename

* ai overlord: nit

* Update exchanges/kucoin/kucoin_futures_types.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: Adrian Gallagher <adrian.gallagher@thrasher.io>
2025-12-17 12:42:34 +11:00

28 lines
857 B
Go

package kucoin
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
testexch "github.com/thrasher-corp/gocryptotrader/internal/testing/exchange"
)
func TestUpdateOrderExecutionLimits(t *testing.T) {
t.Parallel()
testexch.UpdatePairsOnce(t, e)
for _, a := range e.GetAssetTypes(false) {
t.Run(a.String(), func(t *testing.T) {
t.Parallel()
require.NoError(t, e.UpdateOrderExecutionLimits(t.Context(), a), "UpdateOrderExecutionLimits must not error")
pairs, err := e.GetAvailablePairs(a)
require.NoError(t, err, "GetPairs must not error")
for _, p := range pairs {
l, err := e.GetOrderExecutionLimits(a, p)
require.NoError(t, err, "GetOrderExecutionLimits must not error")
assert.Positive(t, l.AmountStepIncrementSize, "AmountStepIncrementSize should not be zero")
}
})
}
}