The provided quantity is invalid. The quantity field must be a positive numeric value.
This message indicates that the quantity provided in the request is invalid. A quantity must be a numeric value that is greater than zero. The one exception is action=resize, where the quantity is the size the position should end at, so 0 is valid there and flattens the position. It can be a string, integer or float as long as it is a numeric value. If the quantity provided is not a valid number, the request will not be processed.
Invalid quantity example:
{
"ticker": "AAPL",
"action": "buy",
"quantity": "ten shares"
}
Here is an example of a valid request that will buy 10 shares of AAPL:
{
"ticker": "AAPL",
"action": "buy",
"quantity": 10
}
Or if you want to use a string for the value, you can as well. As long as it is a numeric value, TradersPost can understand it:
{
"ticker": "AAPL",
"action": "buy",
"quantity": "10"
}
Free 7-day trial
Set-up in 3 minutes
Paper account for testing
By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.