The stop loss configuration is invalid. You cannot specify both an amount and a percent for the stop loss. Use either stopLoss.amount or stopLoss.percent, but not both.
This message indicates that both the stopLoss.amount and stopLoss.percent were provided in the request, which is not allowed. TradersPost requires that you specify only one of these values to set the stop loss. Providing values for both parameters will be considered invalid, and the request will not be processed.
Portfolio PnL (stopLoss.pnlAmount) is a separate mode: combining pnlAmount with amount, percent, stopPrice, or limitPrice is rejected with a different error explaining that stopLoss.pnlAmount cannot be combined with those fields.
Invalid stopLoss example where both amount and percent are provided:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 100,
"stopLoss": {
"type": "stop",
"amount": 10,
"percent": 5
}
}
Valid stopLoss example (amount only) that will calculate a $90 stop price:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 100,
"stopLoss": {
"type": "stop",
"amount": 10
}
}
Valid stopLoss example (percent only) that will calculate a $95 stop price:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 100,
"stopLoss": {
"type": "stop",
"percent": 5
}
}
Free 7-day trial
Set-up in 3 minutes
Paper account for testing