This message indicates that the takeProfit.percent
provided in the request is invalid. TradersPost requires that the takeProfit.percent
be a valid positive number. This percentage is used to calculate a stop loss stop price relative to your positions entry price.
For example, if a takeProfit.percent
such as "-10" or "10 percent" is provided, the request will not be processed.
This error can occur due to several reasons, such as:
takeProfit.percent
is a negative number.takeProfit.percent
is not a number (e.g., it contains letters or special characters).takeProfit.percent
is zero or improperly formatted according to the required parameters.takeProfit.percent
in your request is a positive number and correctly formatted to avoid this error.Invalid takeProfit.percent
example:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 100,
"takeProfit": {
"percent": "5 percent",
},
}
Valid takeProfit.percent
example:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 100,
"takeProfit": {
"percent": "5",
},
}
In the above example, a take profit limit price of $105
would be calculated based on the entry price of $100
and the takeProfit.percent
of 5%
. This would result in a take profit order being filled if the price touches the $105
limit price.