add bacfoy eth
All checks were successful
Build Docker Image / build (amd64) (push) Successful in 5m48s
All checks were successful
Build Docker Image / build (amd64) (push) Successful in 5m48s
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"gopkg.in/telebot.v3"
|
"gopkg.in/telebot.v3"
|
||||||
"me.thuanle/bbot/internal/configs/tele"
|
"me.thuanle/bbot/internal/configs/tele"
|
||||||
"me.thuanle/bbot/internal/data"
|
"me.thuanle/bbot/internal/data"
|
||||||
@@ -40,7 +41,19 @@ func OnTokenInfoByToken(context telebot.Context, token string) error {
|
|||||||
sp, _ := data.Market.GetSpotPrice(sSymbol)
|
sp, _ := data.Market.GetSpotPrice(sSymbol)
|
||||||
|
|
||||||
_ = 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" {
|
||||||
|
baseAmount := 14.
|
||||||
|
basePrice := 2500.0
|
||||||
|
baseTotal := baseAmount * basePrice
|
||||||
|
curTotal := baseAmount * sp
|
||||||
|
|
||||||
|
msg := fmt.Sprintf(
|
||||||
|
"🎉∑ Bắc Kiều Phong's USDT: %.0f\n"+
|
||||||
|
"🎊 Bắc Kiều Phong's lợi nhuận: %.0f",
|
||||||
|
baseTotal, curTotal-baseTotal,
|
||||||
|
)
|
||||||
|
_ = chat.ReplyMessage(context, msg)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user