gateio: add ConvertSmallBalances, GetAccountDetails and GetUserTransactionRateLimitInfo API endpoints (#1889)

* gateio: add function ConvertSmallBalances

* glorious/Thrasher: nits/additions

* file standard

* glorious: nit

* AI: nit

* boss king: nit

* refactor: rename account detail functions and types for consistency

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2025-04-22 12:46:54 +10:00
committed by GitHub
parent 1bf3433d61
commit 977fecab19
4 changed files with 85 additions and 0 deletions

View File

@@ -3887,3 +3887,30 @@ func TestDeriveFuturesWebsocketOrderResponses(t *testing.T) {
})
}
}
func TestConvertSmallBalances(t *testing.T) {
t.Parallel()
err := g.ConvertSmallBalances(t.Context(), currency.EMPTYCODE)
require.ErrorIs(t, err, currency.ErrCurrencyCodeEmpty)
sharedtestvalues.SkipTestIfCredentialsUnset(t, g, canManipulateRealOrders)
err = g.ConvertSmallBalances(t.Context(), currency.F16)
require.NoError(t, err)
}
func TestGetAccountDetails(t *testing.T) {
t.Parallel()
sharedtestvalues.SkipTestIfCredentialsUnset(t, g)
got, err := g.GetAccountDetails(t.Context())
require.NoError(t, err)
require.NotEmpty(t, got)
}
func TestGetUserTransactionRateLimitInfo(t *testing.T) {
t.Parallel()
sharedtestvalues.SkipTestIfCredentialsUnset(t, g)
got, err := g.GetUserTransactionRateLimitInfo(t.Context())
require.NoError(t, err)
require.NotEmpty(t, got)
}