From d68be5b096d1d334022b556988d9e9002ac43008 Mon Sep 17 00:00:00 2001 From: Nikhil Saraf <1028334+nikhilsaraf@users.noreply.github.com> Date: Thu, 30 Jul 2020 20:04:23 +0530 Subject: [PATCH] KrakenExchange should get latest cursor in seconds instead of millis (closes #465) --- plugins/krakenExchange.go | 4 ++-- plugins/krakenExchange_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/krakenExchange.go b/plugins/krakenExchange.go index e7fb312b4..072865840 100644 --- a/plugins/krakenExchange.go +++ b/plugins/krakenExchange.go @@ -522,8 +522,8 @@ func (k *krakenExchange) getTradeHistoryFromEndAscLimit50(tradingPair model.Trad // GetLatestTradeCursor impl. func (k *krakenExchange) GetLatestTradeCursor() (interface{}, error) { - timeNowMillis := time.Now().Unix() * 1000 - latestTradeCursor := fmt.Sprintf("%d", timeNowMillis) + timeNowSecs := time.Now().Unix() + latestTradeCursor := fmt.Sprintf("%d", timeNowSecs) return latestTradeCursor, nil } diff --git a/plugins/krakenExchange_test.go b/plugins/krakenExchange_test.go index dbd803e53..547b3f6be 100644 --- a/plugins/krakenExchange_test.go +++ b/plugins/krakenExchange_test.go @@ -351,12 +351,12 @@ func TestGetTradeHistoryAdapter(t *testing.T) { } func TestGetLatestTradeCursor(t *testing.T) { - startIntervalSecs := time.Now().Unix() * 1000 + startIntervalSecs := time.Now().Unix() cursor, e := testKrakenExchange.GetLatestTradeCursor() if !assert.NoError(t, e) { return } - endIntervalSecs := time.Now().Unix() * 1000 + endIntervalSecs := time.Now().Unix() if !assert.IsType(t, "string", cursor) { return