OKX: Fix intermittent TestGetBlockTrade failure by allowing zero FillVolatility (#1977)

* Initial plan

* Fix intermittent TestGetBlockTrade failure by allowing zero FillVolatility

Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com>

* Make FillVolatility assertion message more concise

Co-authored-by: gbjk <86617+gbjk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thrasher- <4685270+thrasher-@users.noreply.github.com>
Co-authored-by: gbjk <86617+gbjk@users.noreply.github.com>
This commit is contained in:
Copilot
2025-07-21 10:20:10 +10:00
committed by GitHub
parent 1c24bf2491
commit 0fd33341da

View File

@@ -330,7 +330,7 @@ LOOP:
assert.Positive(t, trade.Price.Float64(), "Price should have a positive value")
assert.Positive(t, trade.Size.Float64(), "Size should have a positive value")
assert.Contains(t, []order.Side{order.Buy, order.Sell}, trade.Side, "Side should be a side")
assert.Positive(t, trade.FillVolatility.Float64(), "FillVolatility should have a positive value")
assert.GreaterOrEqual(t, trade.FillVolatility.Float64(), float64(0), "FillVolatility should not be negative")
assert.Positive(t, trade.ForwardPrice.Float64(), "ForwardPrice should have a positive value")
assert.Positive(t, trade.IndexPrice.Float64(), "IndexPrice should have a positive value")
assert.Positive(t, trade.MarkPrice.Float64(), "MarkPrice should have a positive value")