feat: fetch alpha price by symbol ticker

Keep alpha token existence from list cache and fetch live alpha price via symbol ticker endpoint for richer token response accuracy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 18:22:48 +07:00
parent 6e8a2e8f68
commit 82b0f2f1a8
4 changed files with 83 additions and 4 deletions
+5 -1
View File
@@ -66,9 +66,13 @@ func collectRichTokenData(token string) buildRichTokenMessageArgs {
if alphaToken, ok := data.Market.GetAlphaToken(token); ok {
a.HasAlpha = true
a.AlphaPrice = alphaToken.GetPrice()
a.HasAlpha24h = true
a.Alpha24h = alphaToken.GetPercentChange24h()
if alphaPrice, ok := data.Market.GetAlphaPrice(token + "USDT"); ok {
a.AlphaPrice = alphaPrice
} else {
a.AlphaPrice = alphaToken.GetPrice()
}
}
futureSymbol := token + "USDT"