This message indicates that the request to exit an open position cannot be processed because the exit quantity specified is zero. TradersPost requires that the exit quantity be a positive number greater than zero. The exit quantity refers to the number of shares, contracts, or units that you intend to close out from your open position.
Example Scenario:
If you have an open position with a quantity of 1
share of AAPL
and you attempt to exit 50%
of the position, the calculated exit quantity would be 0.5
shares. Since share quantities must be whole numbers, TradersPost rounds this down to zero, resulting in this error.
Instructions to Resolve:
To avoid this error, ensure that the calculated exit quantity is greater than zero. Consider increasing the percentage or using a fixed quantity that results in a non-zero exit quantity.
Invalid Exit Quantity Example:
{
"ticker": "AAPL",
"action": "sell",
"quantityType": "percent_of_position",
"quantity": 50
}
Valid Exit Quantity Example:
{
"ticker": "AAPL",
"action": "sell",
"quantityType": "percent_of_position",
"quantity": 100
}
In the valid example above, the system will process the request to sell 100%
of the AAPL
position, ensuring that the exit quantity is not zero. Always verify your quantity calculations to prevent this error and successfully execute your trades.