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

[localDB] edge case when a fetch only has trades from a new day #143

Closed
askmike opened this issue Jan 13, 2014 · 2 comments
Closed

[localDB] edge case when a fetch only has trades from a new day #143

askmike opened this issue Jan 13, 2014 · 2 comments

Comments

@askmike
Copy link
Owner

askmike commented Jan 13, 2014

debug log:

2014-01-13 00:12:25 (DEBUG):    inserting candle 1436 (2014-01-12 23:56:00 UTC) volume: 42.75600003
2014-01-13 00:12:25 (DEBUG):    Going to publish to redis channel: small candle
2014-01-13 00:12:26 (DEBUG):    inserting candle 1437 (2014-01-12 23:57:00 UTC) volume: 763.0978600000001
2014-01-13 00:12:26 (DEBUG):    Going to publish to redis channel: small candle
2014-01-13 00:12:26 (INFO): Processed trades, sleeping for a minute...
2014-01-13 00:13:24 (DEBUG):    Requested LTC/USD trade data from BTC-e ...
2014-01-13 00:13:25 (DEBUG):    Fetched 150 new trades, from 2014-01-12 23:55:32 UTC to 2014-01-12 23:59:28 UTC
2014-01-13 00:13:25 (DEBUG):    minimum trade treshold: 2014-01-12 23:58:28 UTC
2014-01-13 00:13:25 (DEBUG):    processing 71 trade(s)
2014-01-13 00:13:25 (DEBUG):    from 2014-01-12T23:58:29+00:00 to 2014-01-12T23:59:28+00:00
2014-01-13 00:13:26 (DEBUG):    Skipping creation of already loaded database 2014-01-12
2014-01-13 00:13:26 (DEBUG):    inserting candle 1438 (2014-01-12 23:58:00 UTC) volume: 449.87875952000036
2014-01-13 00:13:26 (DEBUG):    Going to publish to redis channel: small candle
2014-01-13 00:13:26 (INFO): Processed trades, sleeping for a minute...
2014-01-13 00:14:25 (DEBUG):    Requested LTC/USD trade data from BTC-e ...
2014-01-13 00:14:26 (DEBUG):    Fetched 150 new trades, from 2014-01-13 00:00:04 UTC to 2014-01-13 00:00:30 UTC



 FATAL: Fetch data appears from the future, don't know how to process

That check is in place to prevent faulty data and gaps. Though it also happens in a legit situation right after midnight that the new fetch only has trades for the new day.

@pesho
Copy link

pesho commented Jan 28, 2014

Just stumbled on this, with a Gekko instance configured to monitor Kraken:

2014-01-27 11:13:15 (INFO):     Starting to watch the market: Kraken XBT/EUR
2014-01-27 11:13:27 (INFO):     We don't have enough history yet to start giving advice, I'll need to gather more data first.
2014-01-27 11:13:27 (INFO):     I will start giving advice around 2014-01-28 01:14:00 (local time, that's in 14 hours).



 FATAL: Fetch data appears from the future, don't know how to process

Is it really necessary to abort the entire process here? Isn't it enough to just silently ignore the data.

@askmike
Copy link
Owner Author

askmike commented Jun 6, 2016

fixed in 0.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants