Please check on the permissions for your API Key - check to see that Orders has full access. The other thing that you should make sure you do is generate a device ID for your application and use it when you request access in the deviceId field. SHA-256 hashes are a great way to identify a device but you need to ensure that your device ID is the same every time for the same device - eg. when I log in on PC A I want the device ID to be the same every time, but unique compared to PC B.
Typically it’s more of an issue when users change from sim to live, but the device ID often contributes to this issue. deviceId is a field that you can include as part of the request body to /auth/accessTokenRequest. Its purpose is to identify the device using the current access token. This is very strictly enforced in the LIVE environment, but can still come up in the simulation mode. Just pass an ID that is the same for a given device each time, but unique from device to device.
One other thing to check on - make sure you are using your account entity ID for the accountId field. You need to call /account/list or some other account-retrieving operation to find your account’s entity ID, it doesn’t come with the access token.
I have the similar issue. Response :- Response 200 : {‘failureReason’: ‘UnknownReason’, ‘failureText’: ‘Access is denied’}
am using demo api url. All permission setting are done, accountId was taken from /account/list.
{
“accountSpec”: “DEMO******”,
“accountId”: 7****,
“action”: “Buy”,
“symbol”: “MNQM2022”,
“orderQty”: 1,
“orderType”: “Market”,
“isAutomated”: true
}
what should be in the place of accountSpec: yourUserName. I tired with my Trodovate login username, it didn’t work. is any other suggestion to consider?