Webhook Message

Invalid Stop Loss Trail Percent

Invalid stop loss trail percent.

This message indicates that the stopLoss.trailPercent provided in the request is invalid. TradersPost requires that the stopLoss.trailPercent be a valid positive number. If a trail percent such as "-5%" or "five percent" is provided, the request will not be processed.

This error can occur due to several reasons, such as:

  • The stopLoss.trailPercent is a negative number.
  • The stopLoss.trailPercent is not a number (e.g., it contains letters or special characters).
  • The stopLoss.trailPercent is zero or improperly formatted according to the required parameters.
  • Ensure that the stopLoss.trailPercent in your request is a positive number and correctly formatted to avoid this error.

Invalid stopLoss.trailPercent example:

{
    "ticker": "AAPL",
    "action": "sell",
    "orderType": "trailing_stop",
    "stopLoss": {
        "type": "trailing_stop",
        "trailPercent": "-5%"
    }
}

Valid stopLoss.trailPercent example:

{
    "ticker": "AAPL",
    "action": "sell",
    "orderType": "trailing_stop",
    "stopLoss": {
        "type": "trailing_stop",
        "trailPercent": "5"
    }
}

In the above examples, a valid trailing stop loss order includes a positive trailPercent, ensuring clear and precise instructions for the trailing stop loss mechanism.

Ready to automate your trading? Sign up for free today.