This message indicates that the JSON payload provided in the request could not be parsed. TradersPost requires that the JSON payload be well-formed and conform to standard JSON syntax. If the JSON is malformed or contains errors, the request will not be processed.
For example, if the JSON payload includes syntax errors such as missing commas, unmatched brackets, or incorrect use of quotes, the request will not be processed.
This error can occur due to several reasons, such as:
Invalid JSON example where a comma is missing after limitPrice
line:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 150
"timeInForce": "day"
}
Here is the same example with the JSON syntaxt error fixed:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 150,
"timeInForce": "day"
}
In the above examples, a valid JSON payload includes proper syntax with all necessary commas and correctly matched brackets and quotes, ensuring the request meets the required parameters for processing.