Issue with proposal API
Sometime proposal websocket call returns the error code "WrongResponse" and the error message "Wrong response". In some cases the error message is "Неправильный ответ". What could be the reason for this. Please note that, the input data is fine and if we send the same input data again then we get response from proposal.
Comments
Can you paste your proposal request and response here?
I had it happen to me this morning. This is the output from my log file:
{
"echo_req": {
"symbol": "frxUSDJPY",
"subscribe": "1",
"duration": "120",
"currency": "USD",
"amount": "100",
"proposal": "1",
"basis": "stake",
"duration_unit": "s",
"contract_type": "CALL"
},
"error": {
"message": "Wrong response.",
"code": "WrongResponse"
},
"msg_type": "error"
}
We are not storing the whole JSON response on our system. Just the error message and the code is being stored. So i won't be able to supply the whole response. As for the request, its in the following format,
{
"proposal": 1,
"amount": "100",
"basis": "payout",
"contract_type": "CALL",
"currency": "USD",
"duration": "60",
"duration_unit": "s",
"symbol": "R_100"
}
Our system was live since yesterday and we have made 652 proposal calls so far. And received 34 wrong responses. Others were successful. We internally checked if there are any issues with the JSON requests we are sending. No issues there.
Can you check and let me know the situation where you are triggering the response with "WrongResponse" error code. Also have a look at this error message "Неправильный ответ", let me know what this means.
@bsbjai @DragonFly81 WrongResponse comes when our server is not able to respond to request, it can be because of multiple reason like not able to produce proposal for specified inputs or its under very heavy load.
"Неправильный ответ"
this we will check why it gives you in different languageShould we close the proposal stream and initiate a new connection OR wait for few more message streams and see if we are getting proper messages again. We haven't checked what happens after we receive this wrongresponse error, we just close the connection through forget call. We will get this tested. Do you have any other suggestions to take care of this?
@bsbjai In my opinion you should get proper stream after this response, please verify and let us know if thats the case, if not we will check it
Thanks. We will get this checked.
I also had this problem. I received the error message in 3 languages (english, russian and indonesian). This was on the same connection.
{"echo_req":{"symbol":"frxEURUSD","barrier":"-0.00050","subscribe":1,"duration":2400,"currency":"USD","amount":10000,"proposal":1,"basis":"stake","duration_unit":"s","contract_type":"CALL"},"error":{"message":"Wrong response.","code":"WrongResponse"},"msg_type":"error"}
{"echo_req":{"symbol":"frxEURUSD","barrier":"-0.00015","subscribe":1,"duration":2100,"currency":"USD","amount":10000,"proposal":1,"basis":"stake","duration_unit":"s","contract_type":"CALL"},"error":{"message":"Respon yang salah.","code":"WrongResponse"},"msg_type":"error"}
{"echo_req":{"symbol":"frxEURUSD","barrier":"+0.00050","subscribe":1,"duration":1200,"currency":"USD","amount":10000,"proposal":1,"basis":"stake","duration_unit":"s","contract_type":"PUT"},"error":{"message":"Неправильный ответ.","code":"WrongResponse"},"msg_type":"error"}
@fonda how are you handling this? Are you making the proposal call again?
@bsbjai If you wait eventually (1-2 min) you'll receive new proposals. If you need a response right away, you probably need to send a new request.
@fonda Thank you. We started sending new requests.