From 44d704d59011ea90ce577fafeffdb53d9db1252a Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Sat, 17 Sep 2022 18:22:27 +0800 Subject: [PATCH] limit 30 --- api/binancePrice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/binancePrice.go b/api/binancePrice.go index e519f97..a22f611 100644 --- a/api/binancePrice.go +++ b/api/binancePrice.go @@ -26,7 +26,7 @@ func GetBinanceLatestPrice(symbol string) float64 { func GetBinanceLatestPrices(symbol string) []BinancePrice { var binancePrices []BinancePrice - global.DB.Where("symbol = ?", symbol).Find(&binancePrices) + global.DB.Where("symbol = ?", symbol).Limit(30).Find(&binancePrices) return binancePrices }