As detailed here, the side of a position is returned as either 'long' or short'.
However OkexSwapPosition.Side is currently of type OkexSwapOrderSide, which is deserialised from the string values 'buy' and 'sell'. As such the values are not deserialised correctly (for short positions), leading to incorrect position results.
Following the pattern of OkexSwapTransaction.Direction, I believe that OkexSwapPosition.Side should be renamed to OkexSwapPosition.Direction and changed to be of type OkexSwapDirection.
As detailed here, the side of a position is returned as either 'long' or short'.
However OkexSwapPosition.Side is currently of type OkexSwapOrderSide, which is deserialised from the string values 'buy' and 'sell'. As such the values are not deserialised correctly (for short positions), leading to incorrect position results.
Following the pattern of OkexSwapTransaction.Direction, I believe that OkexSwapPosition.Side should be renamed to OkexSwapPosition.Direction and changed to be of type OkexSwapDirection.