MikaLendingBot icon indicating copy to clipboard operation
MikaLendingBot copied to clipboard

Plugin AccountStats / Charts - Inaccurate data for Poloniex (API Issue)

Open utdrmac opened this issue 7 years ago • 10 comments

Poloniex doesn't return complete data when using their API. I've opened several tickets with them. You can test this yourself by calling 'returnLendingHistory' for date X thru Y and do the same in poloniex.com/tradeHistory (change type to Lending Earnings). You'll see stark differences between the two.

Because of this, charts and accountstats plugins will show inaccurate data.

Not sure how to get accurate data.

utdrmac avatar Sep 19 '17 17:09 utdrmac

The only idea I had was since Polo loans have IDs is to do different overlapping repeated requests till you don't get any new ids.

rnevet avatar Sep 19 '17 19:09 rnevet

Hrm. I haven't tested that. Will give it a shot. Repeated API calls with the same dates gives same missing results.

utdrmac avatar Sep 19 '17 20:09 utdrmac

As an FYI, Bittrex is spot on. If you manually download the CSV from their web UI and compare to what is in the SQLite db, it's the same data.

utdrmac avatar Sep 22 '17 17:09 utdrmac

I assumed this was a Poloniex issue... :( The entire code is over complicated because of the weird responses.

rnevet avatar Sep 22 '17 18:09 rnevet

As i understand - i have the same issue. If delete DB and restart poloniex - first stats is ok. But when you fetch data next time it show strange values. As example - mean day earnings 10000 satoshi, but it show something like: 0.00000608 BTC Today 0.0000139 BTC Yesterday But if i will delete DB and restart bot, for the first time it will show actual values.

quantroom-pro avatar Oct 05 '17 07:10 quantroom-pro

@utdrmac last attempt, I'm assuming we are using the fetch history wrong and the start&end dates behavior is somehow effecting not only the close date but also the open dates.

I'm testing the following:

    def fetch_history(self, first_time_stamp, last_time_stamp):
        first_time_stamp = first_time_stamp - 172800

Basically add a 2 day offset to the start to catch. (this won't catch longer loans)

If this improves the results I need to re-think the way we perform the syncing of loans.

rnevet avatar Oct 09 '17 21:10 rnevet

@rnevet Saw your slack. So you think the API is for open dates rather than closing?

utdrmac avatar Oct 11 '17 23:10 utdrmac

@utdrmac I'm not sure but it seems much more accurate with this patch.

rnevet avatar Oct 23 '17 19:10 rnevet

Can we close this @utdrmac / @rnevet ?

laxdog avatar Nov 17 '17 11:11 laxdog

No,. The issue is still there.

rnevet avatar Nov 17 '17 11:11 rnevet