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:
2026-04-27 04:44:30 +07:00
parent 06c40ef30f
commit 711721c1ee
9 changed files with 296 additions and 108 deletions
+8 -5
View File
@@ -2,13 +2,16 @@ package binance
var SymbolPrefixList = []string{"1000000", "1000", "1M"}
var SymbolSuffixList = []string{"USDT", "USDC"}
var SymbolSuffixList = []string{"USDT", "USDC", "FDUSD"}
var SymbolSuffixMap = map[string]string{
"USDT": "",
"USDC": "c",
"USDT": "",
"USDC": "c",
"FDUSD": "fd",
}
var Future2SpotSymbolMap = map[string]string{
"LUNA2USDT": "LUNAUSDT",
var QuotePriority = []string{"USDT", "USDC", "FDUSD"}
var FutureToken2SpotTokenMap = map[string]string{
"LUNA2": "LUNA",
}