refactor: use canonical token-to-symbol maps for market lookup
Build canonical spot/future token maps with quote priority, unify cache refresh scheduling, and switch resolver/token tests to map-based token lookups. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
06c40ef30f
commit
711721c1ee
9 files changed
+296
-108
No files matched your search
@@ -51,9 +51,9 @@ func Future2SpotSymbol(sym string) string {
|
||||
}
|
||||
}
|
||||
|
||||
spotSym, ok := binance.Future2SpotSymbolMap[sym]
|
||||
if !ok {
|
||||
return sym
|
||||
token := Symbol2Token(sym)
|
||||
if mapped, ok := binance.FutureToken2SpotTokenMap[token]; ok {
|
||||
token = strings.ToUpper(mapped)
|
||||
}
|
||||
return spotSym
|
||||
return token + "USDT"
|
||||
}
|
||||
Reference in new issue
Block a user