I took the example code from here
put it in javascript console to see what valid output should look like.
bracket:
{
"qty": 1,
"profitTarget": 2,
"stopLoss": -4,
"trailingStop": true
}
order data
{
"entryVersion": {
"orderQty": 1,
"orderType": "Market"
},
"brackets": [
{
"qty": 1,
"profitTarget": 2,
"stopLoss": -4,
"trailingStop": true
}
]
}
order object
{
"accountId": 1221,
"accountSpec": "name",
"symbol": "MESH2",
"action": "Buy",
"orderStrategyTypeId": 2,
"params": "{\"entryVersion\":{\"orderQty\":1,\"orderType\":\"Market\"},\"brackets\":[{\"qty\":1,\"profitTarget\":2,\"stopLoss\":-4,\"trailingStop\":true}]}"
}
my object
orderStrategy/startOrderStrategy
3
{
"accountSpec":"xxx",
"accountId":000,
"symbol":"MESH2",
"action":"Buy",
"orderStrategyTypeId":2,
"params":"{\"entryVersion\":{\"orderQty\":1,\"orderType\":\"Market\"},\"brackets\":[{\"qty\":1,\"profitTarget\":-30,\"stopLoss\":15,\"trailingStop\":false}]}"
}
Other than the order of a few variables, both objects look fine. Why am i getting 404
{'s': 404, 'i': 3, 'd': ''}