diff --git a/internal/helper/binancex/resolver_test.go b/internal/helper/binancex/resolver_test.go index b3f13fc..1782b78 100644 --- a/internal/helper/binancex/resolver_test.go +++ b/internal/helper/binancex/resolver_test.go @@ -137,6 +137,14 @@ func TestIsToken(t *testing.T) { }, want: true, }, + { + name: "spot only token fallback", + input: "abc", + marketStub: &resolverMarketStub{ + spotPairs: map[string]bool{"ABCUSDT": true}, + }, + want: true, + }, { name: "non alphanumeric input", input: "bad!", diff --git a/internal/helper/binancex/symbol.go b/internal/helper/binancex/symbol.go index b45c06d..ea74329 100644 --- a/internal/helper/binancex/symbol.go +++ b/internal/helper/binancex/symbol.go @@ -30,12 +30,10 @@ var ( ) func IsToken(s string) bool { - // First check regular symbols - if len(Token2FutureSymbols(s)) > 0 { + if len(Token2SpotSymbols(s)) > 0 { return true } - // Then check Alpha tokens s = strings.ToUpper(s) return data.Market.IsAlphaToken(s) }