add margin
All checks were successful
Build Docker Image / build (amd64) (push) Successful in 1m47s

This commit is contained in:
thuanle
2024-10-24 10:58:32 +07:00
parent b60fcb842d
commit 94a11e8d68
10 changed files with 98 additions and 30 deletions

View File

@@ -31,13 +31,15 @@ func OnTokenInfoByToken(context telebot.Context, token string) error {
showStickerMode(context, token)
fp, fundRate, fundTime, ok := data.Market.GetFuturePrice(symbols[0])
marginRates := data.Market.GetMarginInterestRates()
tokenInterestRate := marginRates[strings.ToUpper(token)]
if !ok {
return nil
}
sSymbol := binancex.Future2SpotSymbol(symbols[0])
sp, _ := data.Market.GetSpotPrice(sSymbol)
_ = chat.ReplyMessage(context, view.RenderOnPriceMessage(symbols[0], sp, fp, fundRate, fundTime))
_ = chat.ReplyMessage(context, view.RenderOnPriceMessage(symbols[0], sp, fp, fundRate, fundTime, tokenInterestRate))
return nil
}