trang bức amount
All checks were successful
Build Docker Image / build (amd64) (push) Successful in 21s

This commit is contained in:
thuanle
2025-09-19 10:37:31 +07:00
parent 92a11492fb
commit 97c627e97c

View File

@@ -46,13 +46,13 @@ func OnTokenInfoByToken(context telebot.Context, token string) error {
_ = chat.ReplyMessage(context, view.RenderOnPriceMessage(symbols[0], sp, fp, fundRate, fundTime, tokenInterestRate)) _ = chat.ReplyMessage(context, view.RenderOnPriceMessage(symbols[0], sp, fp, fundRate, fundTime, tokenInterestRate))
if strings.ToUpper(token) == "ETH" { if strings.ToUpper(token) == "ETH" {
mFmt := message.NewPrinter(language.AmericanEnglish) mFmt := message.NewPrinter(language.AmericanEnglish)
baseAmount := 35. realAmount := 35.
trangBucBaseAmount := 17. trangBucAmount := 14.
basePrice := 2500.0 basePrice := 2500.0
baseTotal := baseAmount * basePrice baseTotal := realAmount * basePrice
trangBucTotal := trangBucBaseAmount * basePrice trangBucTotal := trangBucAmount * basePrice
curTotal := baseAmount * sp realCurTotal := realAmount * sp
trangBucCurTotal := trangBucBaseAmount * sp trangBucCurTotal := trangBucAmount * sp
lastDelta := "" lastDelta := ""
if lastEthPrice == 0 { if lastEthPrice == 0 {
@@ -62,7 +62,7 @@ func OnTokenInfoByToken(context telebot.Context, token string) error {
"Δ price: $%+.0f\n"+ "Δ price: $%+.0f\n"+
"Δ Usdt: $%+.0f\n", "Δ Usdt: $%+.0f\n",
sp-lastEthPrice, sp-lastEthPrice,
(sp-lastEthPrice)*baseAmount, (sp-lastEthPrice)*realAmount,
) )
lastEthPrice = sp lastEthPrice = sp
} }
@@ -72,17 +72,19 @@ func OnTokenInfoByToken(context telebot.Context, token string) error {
"∑ USDT: $%.0f\n"+ "∑ USDT: $%.0f\n"+
"Lợi nhuận: $%.0f\n"+ "Lợi nhuận: $%.0f\n"+
"%s\n"+ "%s\n"+
"\n"+
"🚀🚀🚀🚀🚀 Road to 5k 🚀🚀🚀🚀🚀: \n"+ "🚀🚀🚀🚀🚀 Road to 5k 🚀🚀🚀🚀🚀: \n"+
"- Δ Price: $%0.0f\n"+ "- Δ Price: $%0.0f\n"+
"- Δ Vol: $%0.0f\n"+ "- Δ Vol: $%0.0f\n"+
"💸💸💸💸💸💸 Trang Bức balance 💸💸💸💸💸💸\n"+ "\n"+
"💸💸💸💸💸 Trang Bức balance 💸💸💸💸💸\n"+
"∑ USDT: $%.0f\n"+ "∑ USDT: $%.0f\n"+
"Lợi nhuận: $%.0f\n", "Lợi nhuận: $%.0f\n",
curTotal, realCurTotal,
curTotal-baseTotal, realCurTotal-baseTotal,
lastDelta, lastDelta,
5000-sp, 5000-sp,
5000*baseAmount-curTotal, 5000*realAmount-realCurTotal,
trangBucCurTotal, trangBucCurTotal,
trangBucCurTotal-trangBucTotal, trangBucCurTotal-trangBucTotal,
) )