INNER CODE UNIT · Go

isOrderInTimeRangeToSell

aleibovici/cryptopump · algorithms/algorithms.go:157

func isOrderInTimeRangeToSell(
	order types.Order,
	timeRange time.Duration) bool {

	timeNow := time.Now()
	timeTransaction := time.Unix(order.TransactTime/1000, 0)

	return timeNow.Sub(timeTransaction).Seconds() > float64(timeRange)

}

// ParseSymbolFiat parse and selects the symbol fiat coin to be used from sessionData.Symbol
func ParseSymbolFiat(sessionData *types.Session) (symbolFiat string, err error) {

	if sessionData.Symbol == "" { /* Test if symbol is empty */
		return "", errors.New("Fail to parse Symbol Fiat")
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…