Error on buy contract in v3
Hi,
Anyone can help, I am using v3 websocket version. When i send request buy it is showing error.. Authorization required. I am sending below request..
ws.send(JSON.stringify({"authorize": apitokenid}));
ws.send(JSON.stringify({"buy":id,"price":ask_price}));
Best Answers
-
Hello.
What Error do you get?Do you get correct response when you send authorize query?
Regards
-
Hi, Thanks for reply.. please see attach error details. API toke
n passed before buy contract. no issue with token. -
That error is becase you're not authorized correctly.
Do you get this when you send authorize query.{ "echo_req": { "authorize": "345dfd34sdfs" }, "authorize": { "scopes": [ "read", "admin", "trade", "payments" ], "currency": "USD", "email": "youremail@gmail.com", "balance": "35454.6000", "landing_company_name": "fog", "loginid": "VRTC434553", "fullname": " ", "is_virtual": 1 }, "msg_type": "authorize" }
Regards
-
I think you maybe are closing the socket before authorize.
Regards