π TradeX v1.3.1 β Position Closure Fix for Bybit
π οΈ Release Highlights
This is a small but important patch release targeting Bybit position closure logic.
π Bugfix
- Fixed an edge case where closing a LONG position on Bybit could accidentally trigger a doubling of contracts instead of closing it properly.
- The issue was caused by the
sidedetection logic not accounting for"long"in addition to"buy".
Updated logic:side = "sell" if (pos["side"] == "buy" or pos["side"] == "long") else "buy"