Look at the output below. If I try to place order I access denied, doing user/list and account/list both return as expected. This is all in the same websocket connection, why is only placing order failing…?
API – last command
[order/placeorder
3
{"accountSpec":"username","accountId":000,"action":"Sell","timeInForce":"Day","symbol":"2553027","orderQty":2,"orderType":"Limit","price":4464.5,"isAutomated":true}]
[{'s': 200, 'i': 3, 'd': {'failureReason': 'UnknownReason', 'failureText': 'Access is denied'}}]
API – last command
[user/list
4
]
[{'s': 200, 'i': 4, 'd': [{'id': 000, 'name': 'login_name', 'timestamp': '2022-02-10T21:19:30.772Z', 'userType': 'Trader', 'email': '***@***.com', 'status': 'Active', 'creationTimestamp': '2022-02-10T21:18:25.053Z', 'professional': False, 'twoFactorAuth': True}]}]
API – last command
[account/list
5
]
[{'s': 200, 'i': 5, 'd': [{'id': 000, 'name': 'name_in_tradovate', 'userId': 000, 'accountType': 'Customer', 'active': True, 'clearingHouseId': 0, 'riskCategoryId': 0, 'autoLiqProfileId': 0, 'marginAccountType': 'Speculator', 'legalStatus': 'Individual', 'archived': False, 'timestamp': '2022-02-11T16:14:14Z', 'nickname': 'nickname_in_tradovate'}]}]
Using the demo urls for websocket and api.
API – last command
[order/placeorder
3
{"accountSpec":"DEMO000","accountId":000,"action":"Buy","timeInForce":"Day","symbol":2553027,"orderQty":2,"orderType":"Limit","price":4466.0,"isAutomated":true}]
[{'s': 200, 'i': 3, 'd': {'orderId': 3556122208}}]
API -- entity -- ORDER REJECTED -- order_status [ExecutionRejected] order_id [-1.0] last_order_id [0]
[{'e': 'props', 'd': {'entityType': 'commandReport', 'eventType': 'Created', 'entity': {'id': 3556122210, 'commandId': 3556122208, 'timestamp': '2022-03-19T06:51:42.554Z', 'commandStatus': 'ExecutionRejected', 'rejectReason': 'SessionClosed', 'text': 'Cannot place order outside of market hours. Please check contract specifications or quote info to view market hours.'}}}]
API – last command
[user/list
5
]
[{'s': 200, 'i': 5, 'd': [{'id': 000, 'name': 'login_name', 'timestamp': '2022-02-10T21:19:30.772Z', 'userType': 'Trader', 'email': '****@***.com', 'status': 'Active', 'creationTimestamp': '2022-02-10T21:18:25.053Z', 'professional': False, 'twoFactorAuth': True}]}]
API – last command
[account/list
4
]
[{'s': 200, 'i': 4, 'd': [{'id': 000, 'name': 'DEMO000', 'userId': 000, 'accountType': 'Customer', 'active': True, 'clearingHouseId': 0, 'riskCategoryId': 0, 'autoLiqProfileId': 0, 'marginAccountType': 'Speculator', 'legalStatus': 'Individual', 'archived': False, 'timestamp': '2022-02-10T21:19:31Z'}]}]
What is going on?
Can you expand on the above statement?