Webhook Message

Invalid Trailing Stop

Invalid trailing stop provided. When orderType=trailing_stop, action must be one of buy, sell or exit and you are required to send one of trailAmount or trailPercent.

This message indicates that the trailing stop provided in the request is invalid. TradersPost requires that when orderType=trailing_stop, the action must be one of the following: buy, sell, or exit. Additionally, you are required to send one of trailAmount or trailPercent. If these criteria are not met, the request will not be processed.

Invalid trailing stop example. Missing trailAmount or trailPercent:

{
    "ticker": "AAPL",
    "action": "cancel",
    "orderType": "trailing_stop"
}

Valid trailing stop example (trailAmount):

{
    "ticker": "AAPL",
    "action": "sell",
    "orderType": "trailing_stop",
    "trailAmount": "2"
}

Valid trailing stop example (trailPercent):

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

In the above examples, a valid trailing stop order includes an appropriate action and a value for either trailAmount or trailPercent, ensuring the request meets the required parameters for processing.

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