Intent-Code Divergence
High
- Confidence
- 97% confidence
- Finding
- The sample code’s close_position() method contradicts the earlier safety guidance by placing a reverse market order without setting reduce_only=true. In a one-way position system, this can unintentionally open a new opposite position after flattening, causing unauthorized account state changes and unexpected trading losses.
