This message indicates that a stop loss value provided in the request is invalid because a stopPrice is required. TradersPost requires that any stop loss order must include a stopPrice to define the price at which the stop loss order will be triggered. Without a stopPrice, the request will not be processed.
This error can occur due to several reasons, such as:
stopPrice is missing from the stop loss order.stopPrice for stop loss orders.stopPrice for all stop loss orders to avoid this error.Invalid stopLoss example where the stopPrice is missing:
{
"ticker": "AAPL",
"action": "sell",
"orderType": "stop",
"stopLoss": {
"type": "stop"
}
}
Valid stopLoss value example:
{
"ticker": "AAPL",
"action": "sell",
"orderType": "stop",
"stopLoss": {
"type": "stop",
"stopPrice": 95
}
}
In the above examples, a valid stop loss order includes a stopPrice, ensuring clear and precise instructions for when the stop loss order should be triggered.