Webhook Message

Invalid Stop Loss Relative And Absolute

Invalid stop loss value. You cannot have a value for both relative and absolute stop losses.

This message indicates that both relative and absolute stop loss values were provided in the request, which is not allowed. TradersPost requires that you specify only one type of stop loss value to avoid conflicts. Providing values for both parameters will be considered invalid, and the request will not be processed.

Here is an invalid payload where both a percent and stopPrice are provided, which is not valid:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "stopLoss": {
        "type": "stop",
        "percent": "5",
        "stopPrice": 95
    },
}

Here is a valid payload where only one type of stop loss value is provided:

{
    "ticker": "AAPL",
    "action": "buy",
    "orderType": "limit",
    "limitPrice": 100,
    "stopLoss": {
        "type": "stop",
        "stopPrice": 95
    },
}

The above example will enter at a limit price of $100 and have a stop loss order at $95. This means that if the price touches $95, the stop loss order will be converted to a market order and executed at the best available price.

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