if((takeProfitPrice && side === "BUY" && takeProfitPrice < refPrice) ||
               (takeProfitPrice && side === "SELL" && takeProfitPrice > refPrice)) {
                throw "Take profit order is on the wrong side";
            }