Rewrite price lookup from WebSocket to REST API

Replace unreliable WebSocket connections with on-demand REST API calls
for spot and futures prices. Add cached trading pair list (refreshed
hourly) for symbol validation, and /refresh command for manual updates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 15:14:09 +07:00
parent c5c1cdf0d5
commit 9c39423315
8 changed files with 169 additions and 93 deletions
+1 -2
View File
@@ -29,8 +29,7 @@ var (
)
func testSym(sym string) bool {
_, _, _, test := data.Market.GetFuturePrice(sym)
return test
return data.Market.IsFuturesPair(sym)
}
func Token2Symbols(token string) []string {