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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user