Hello everyone, whenever I try to place an order by sending a post request to https://demo.tradovateapi.com/v1/order/placeorder I get a 400 error “bad request.” I also see that the response says { violations: [array] }. My access token was just refreshed before running the program and has worked with other endpoints. My request snippet is below along with some screenshots. Please advise. Any assistance is appreciated.
let params = {
"accountId": CENSORED,
"action": "Buy",
"symbol": "RTYH3",
"orderQty": 1,
"orderType": "TrailingStop",
"timeInForce": "GTC",
"isAutomated": true
}
axios.post("https://demo.tradovateapi.com/v1/order/placeorder", params ,{
headers: {
"Authorization": `Bearer ${accessToken}`,
"Content-Type": "application/json"
}
}).then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});