Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
KrakenExchange should get latest cursor in seconds instead of millis (c…
Browse files Browse the repository at this point in the history
…loses #465)
  • Loading branch information
nikhilsaraf committed Jul 30, 2020
1 parent 4ae6d6b commit d68be5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/krakenExchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/krakenExchange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d68be5b

Please sign in to comment.