mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
* 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>
28 lines
857 B
Go
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")
|
|
}
|
|
})
|
|
}
|
|
}
|