Hi @Alexander I’m finally circling back on this one. I have not had success so far. I am not sure if I am missing a required field or I am targeting the right replay session since the -x on the end is variable each replay session.
When sending a change to the replay speed it is working and I see the change happen in the UI, so I know I have an active websocket connection to replay and am able to push a correctly formatted message. I believe my issue with /placeorder is the json itself. No issues with the following.
replay/changespeed
49
{ "speed":100}
This however is not working
order/placeorder
5
{"accountSpec": "DEMO123456","accountId": "RPL123456-62","action": "Buy","symbol":"NQU2","orderQty": 1,"orderType": "Market","isAutomated": true }
or
order/placeorder
5
{"AccountSpec": "RPL123456-62","AccountId": "","ClOrdId": "","Action": "Buy","Symbol": "NQU2","OrderQty": 1,"OrderType": "Market","Price": "","StopPrice": "","MaxShow": "","PegDifference": "","TimeInForce": "Day","ExpireTime": "","Text": "Sample","ActivationTime": ""}
or
order/placeorder
5
{"AccountSpec": "DEMO123456","AccountId": "","ClOrdId": "","Action": "Buy","Symbol": "NQU2","OrderQty": 1,"OrderType": "Market","Price": "","StopPrice": "","MaxShow": "","PegDifference": "","TimeInForce": "Day","ExpireTime": "","Text": "Sample","ActivationTime": ""}
I feel like I’m close on this but no luck so far, could you please advise?
Update: I found the response error. I definitely need help with the correct json to send in here.
Next update: The first issue here is the AccountSpec is your username, and AccountId is the AccountId without DEMO or RPL prefixed to the integer. Maybe the doc can be more clear here?
order/placeorder
5
{"accountSpec": "userId","accountId": 123456,"action": "Buy","symbol":"NQU2","orderQty": 1,"orderType": "Market","isAutomated": true }
I am now stuck on a ‘Access is denied’, however I have confirmed the token has the maximum permissions possible and full access to the orders endpoint…Will continue.