Add dedicated Alpha token price display with 24h change
Build Docker Image / build (amd64) (push) Successful in 1m31s
Build Docker Image / build (amd64) (push) Successful in 1m31s
Alpha tokens now show a simplified format with price and 24h change instead of the regular token format with empty futures/funding data. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -29,20 +29,19 @@ func showStickerMode(context telebot.Context, token string) {
|
||||
|
||||
func OnTokenInfoByToken(context telebot.Context, token string) error {
|
||||
token = strings.ToUpper(token)
|
||||
|
||||
|
||||
// Check if it's an Alpha token first
|
||||
if data.Market.IsAlphaToken(token) {
|
||||
showStickerMode(context, token)
|
||||
|
||||
|
||||
if alphaToken, exists := data.Market.GetAlphaToken(token); exists {
|
||||
sp := alphaToken.GetPrice()
|
||||
// For Alpha tokens, we don't have future price, funding rate, etc.
|
||||
// Use spot price for both spot and future in the display
|
||||
_ = chat.ReplyMessage(context, view.RenderOnPriceMessage(token, sp, sp, 0, 0, 0))
|
||||
change24h := alphaToken.GetPercentChange24h()
|
||||
_ = chat.ReplyMessage(context, view.RenderOnAlphaPriceMessage(token, sp, change24h))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
// Regular token handling
|
||||
symbols := binancex.Token2Symbols(token)
|
||||
if len(symbols) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user