From d0f0281d94a0a9b32aa667bde332dcefe8c94c73 Mon Sep 17 00:00:00 2001 From: Starsquid <108214377+starsquidnodes@users.noreply.github.com> Date: Sun, 14 Apr 2024 13:11:48 +0200 Subject: [PATCH] Log spread percentage on error --- oracle/provider/finv2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oracle/provider/finv2.go b/oracle/provider/finv2.go index 7b2a752..2925026 100644 --- a/oracle/provider/finv2.go +++ b/oracle/provider/finv2.go @@ -135,11 +135,11 @@ func (p *FinV2Provider) Poll() error { high = base } - spread := high.Sub(low) - if high.GT(low.Mul(floatToDec(1.1))) { + spread := high.Sub(low).Quo(low) p.logger.Error(). Str("spread", spread.String()). + Str("symbol", symbol). Msg("spread too large") continue }