|
|
|
@ -28,7 +28,7 @@ func GetBinanceLatestPrice(symbol string) float64 {
|
|
|
|
func GetBinanceLatestPrices(symbol string) []BinancePrice {
|
|
|
|
func GetBinanceLatestPrices(symbol string) []BinancePrice {
|
|
|
|
var binancePrices []BinancePrice
|
|
|
|
var binancePrices []BinancePrice
|
|
|
|
//global.DB.Where("symbol = ? ", symbol).Find(&binancePrices)
|
|
|
|
//global.DB.Where("symbol = ? ", symbol).Find(&binancePrices)
|
|
|
|
global.DB.Where("symbol = ? ", symbol).Order("id desc").Limit(500).Find(&binancePrices)
|
|
|
|
global.DB.Where("symbol = ? ", symbol).Order("id desc").Limit(1000).Find(&binancePrices)
|
|
|
|
//global.DB.Where("symbol = ? order by id desc", symbol).Limit(30).Find(&binancePrices)
|
|
|
|
//global.DB.Where("symbol = ? order by id desc", symbol).Limit(30).Find(&binancePrices)
|
|
|
|
reverseSlice := func(in []BinancePrice) []BinancePrice {
|
|
|
|
reverseSlice := func(in []BinancePrice) []BinancePrice {
|
|
|
|
out := make([]BinancePrice, len(in))
|
|
|
|
out := make([]BinancePrice, len(in))
|
|
|
|
|