Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stale prices supplied after exchange provider API fails. #18

Closed
ghost opened this issue Aug 20, 2023 · 0 comments · Fixed by #19
Closed

Stale prices supplied after exchange provider API fails. #18

ghost opened this issue Aug 20, 2023 · 0 comments · Fixed by #19

Comments

@ghost
Copy link

ghost commented Aug 20, 2023

Production bug encountered: XMR price became divergent from the exchange rate supplier prices. All pricenodes were consistent between themselves, but divergent from reality, e.g. real price was 0.0057, bisq price 0.00558

It was tracked down to one exchange API (Poloniex) which had started returning error 403:forbidden.

However, the cached rates from Poloniex were still being provided internally in the Pricenode, therefore dragging down the Bisq average price.

Pricenode should not keep returning stale prices when a provider API fails.


The code was written with the intention that if the provider fails, no prices should be provided. That makes sense. Now, why in this case are previous Poloniex prices sticking around? Its because in this particular case the exception happens too early, outside of a try..catch block, it is not being handled in doGet() so the exception propagates higher meaning results never reach the PriceProvider which keeps its previous values (until the Poloniex API is restored, or the PriceNode is rebooted).

I am working on a fix.

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

Successfully merging a pull request may close this issue.

0 participants