Hello,
I'm getting this error message when running from the web server, although I didn't get this a couple of weeks ago when running from a Linux terminal. Am not sure what the problem is! The full error message is:
Status: FAILURE
ErrorCode: PERMISSION_DENIED
Instruction Status: FAILURE
Instruction ErrorCode: ERROR_IN_ORDER
The code I'm using to place the bet comes from the sample code and is:
The error message comes from this code:
It seems to me that it's an error from the instruction parameters. I took the size and price out of " marks but that made no difference, and I can't see why it doesn't work.
Any help would be much appreciated! (Tried google but only result was not having price/size in " marks.)
I'm getting this error message when running from the web server, although I didn't get this a couple of weeks ago when running from a Linux terminal. Am not sure what the problem is! The full error message is:
Status: FAILURE
ErrorCode: PERMISSION_DENIED
Instruction Status: FAILURE
Instruction ErrorCode: ERROR_IN_ORDER
The code I'm using to place the bet comes from the sample code and is:
Code:
function placeBet($appKey, $sessionToken, $marketId, $selectionId)
{
$params = '{"marketId":"' . $marketId . '",
"instructions":
[{"selectionId":"' . $selectionId . '",
"handicap":"0",
"side":"BACK",
"orderType":
"LIMIT",
"limitOrder":{"size":2,
"price":2,
"persistenceType":"LAPSE"}
}]
}';
$jsonResponse = sportsApingRequest($appKey, $sessionToken, 'placeOrders', $params);
return $jsonResponse[0]->result;
}
Code:
function printBetResult($betResult)
{
echo "Status: " . $betResult->status . "\n";
if ($betResult->status == 'FAILURE') {
echo "\nErrorCode: " . $betResult->errorCode;
echo "\n\nInstruction Status: " . $betResult->instructionReports[0]->status;
echo "\nInstruction ErrorCode: " . $betResult->instructionReports[0]->errorCode;
} else
echo "Bet placement succeeded!";
}
Any help would be much appreciated! (Tried google but only result was not having price/size in " marks.)


Comment